Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/tests-integration-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ on:
env:
ENV_NAME: ${{ inputs.env-name }}
NODES: 12
FLAKE_ATTEMPTS: ${{ vars.TEST_FLAKE_ATTEMPTS || '4' }}
FLAKE_ATTEMPTS: ${{ vars.TEST_FLAKE_ATTEMPTS || '5' }}
BBL_CLI_VERSION: ${{ vars.BBL_CLI_VERSION }}
BOSH_CLI_VERSION: ${{ vars.BOSH_CLI_VERSION }}
CREDHUB_CLI_VERSION: ${{ vars.CREDHUB_CLI_VERSION }}
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/tests-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,13 @@ jobs:
needs:
- get-sha
- set-env-name
- run-integration-tests-cf-env
if: ${{
always() &&
needs.set-env-name.result == 'success' &&
(github.event_name != 'workflow_dispatch' || inputs.workflow == 'all' ||
inputs.workflow == 'run-integration-tests-cf-env-with-client-creds') }}
inputs.workflow == 'run-integration-tests-cf-env-with-client-creds') &&
needs.run-integration-tests-cf-env.result != 'failure' }}
uses: ./.github/workflows/tests-integration-reusable.yml
with:
name: Integration client creds
Expand Down
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
CF_DIAL_TIMEOUT ?= 15
NODES ?= 10
FLAKE_ATTEMPTS ?=5
GINKGO_SUITE_TIMEOUT=2h
PACKAGES ?= api actor command types util version integration/helpers
LC_ALL = "en_US.UTF-8"

Expand All @@ -20,7 +21,7 @@ UNAME_S := $(shell uname -s)
POLL_PROGRESS_THRESHOLD=120s

GINKGO_FLAGS ?= -r -randomize-all -require-suite
GINKGO_INT_FLAGS = $(GINKGO_FLAGS) --poll-progress-after $(POLL_PROGRESS_THRESHOLD) -flake-attempts $(FLAKE_ATTEMPTS)
GINKGO_INT_FLAGS = $(GINKGO_FLAGS) --poll-progress-after $(POLL_PROGRESS_THRESHOLD) -flake-attempts $(FLAKE_ATTEMPTS) --timeout $(GINKGO_SUITE_TIMEOUT)
ginkgo_int = ginkgo $(GINKGO_INT_FLAGS)

GINKGO_UNITS_FLAGS = $(GINKGO_FLAGS) -randomize-suites
Expand Down Expand Up @@ -227,4 +228,4 @@ version: ## Print the version number of what would be built
.PHONY: help

help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-34s\033[0m %s\n", $$1, $$2}'
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-34s\033[0m %s\n", $$1, $$2}'
1 change: 1 addition & 0 deletions bin/cleanup-integration
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ cf orgs | grep -i -e ^integration-org -e CATS- | xargs_func cf delete-org -f
cf delete-org -f temp-org

cf buildpacks | awk '/INTEGRATION-BUILDPACK/ { if(NF >= 6) { printf("cf delete-buildpack -f %s -s %s\n", $2, $3); } else { printf("cf delete-buildpack -f %s\n", $2); }}' | bash
cf buildpacks | awk '/INTEGRATION-BUILDPACK/ { printf("cf delete-buildpack -f %s\n", $2); }' | bash

for stack in $(cf stacks | awk '/INTEGRATION-STACK/ { print $1 }'); do
echo Deleting $stack
Expand Down
18 changes: 9 additions & 9 deletions integration/assets/hydrabroker/go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module code.cloudfoundry.org/cli/integration/assets/hydrabroker

go 1.24.0
go 1.25

toolchain go1.24.10
toolchain go1.25.4

require (
github.com/go-playground/validator/v10 v10.8.0
Expand All @@ -25,11 +25,11 @@ require (
github.com/leodido/go-urn v1.2.1 // indirect
github.com/pkg/errors v0.9.1 // indirect
go.yaml.in/yaml/v3 v3.0.4 // indirect
golang.org/x/crypto v0.41.0 // indirect
golang.org/x/mod v0.27.0 // indirect
golang.org/x/net v0.43.0 // indirect
golang.org/x/sync v0.16.0 // indirect
golang.org/x/sys v0.35.0 // indirect
golang.org/x/text v0.28.0 // indirect
golang.org/x/tools v0.36.0 // indirect
golang.org/x/crypto v0.45.0 // indirect
golang.org/x/mod v0.29.0 // indirect
golang.org/x/net v0.47.0 // indirect
golang.org/x/sync v0.18.0 // indirect
golang.org/x/sys v0.38.0 // indirect
golang.org/x/text v0.31.0 // indirect
golang.org/x/tools v0.38.0 // indirect
)
28 changes: 14 additions & 14 deletions integration/assets/hydrabroker/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -105,45 +105,45 @@ go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.41.0 h1:WKYxWedPGCTVVl5+WHSSrOBT0O8lx32+zxmHxijgXp4=
golang.org/x/crypto v0.41.0/go.mod h1:pO5AFd7FA68rFak7rOAGVuygIISepHftHnr8dr6+sUc=
golang.org/x/crypto v0.45.0 h1:jMBrvKuj23MTlT0bQEOBcAE0mjg8mK9RXFhRH6nyF3Q=
golang.org/x/crypto v0.45.0/go.mod h1:XTGrrkGJve7CYK7J8PEww4aY7gM3qMCElcJQ8n8JdX4=
golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
golang.org/x/mod v0.27.0 h1:kb+q2PyFnEADO2IEF935ehFUXlWiNjJWtRNgBLSfbxQ=
golang.org/x/mod v0.27.0/go.mod h1:rWI627Fq0DEoudcK+MBkNkCe0EetEaDSwJJkCcjpazc=
golang.org/x/mod v0.29.0 h1:HV8lRxZC4l2cr3Zq1LvtOsi/ThTgWnUk/y64QSs8GwA=
golang.org/x/mod v0.29.0/go.mod h1:NyhrlYXJ2H4eJiRy/WDBO6HMqZQ6q9nk4JzS3NuCK+w=
golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.43.0 h1:lat02VYK2j4aLzMzecihNvTlJNQUq316m2Mr9rnM6YE=
golang.org/x/net v0.43.0/go.mod h1:vhO1fvI4dGsIjh73sWfUVjj3N7CA9WkKJNQm2svM6Jg=
golang.org/x/net v0.47.0 h1:Mx+4dIFzqraBXUugkia1OOvlD6LemFo1ALMHjrXDOhY=
golang.org/x/net v0.47.0/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw=
golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
golang.org/x/sync v0.18.0 h1:kr88TuHDroi+UVf+0hZnirlk8o8T+4MrK6mr60WkH/I=
golang.org/x/sync v0.18.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI=
golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc=
golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.28.0 h1:rhazDwis8INMIwQ4tpjLDzUhx6RlXqZNPEM0huQojng=
golang.org/x/text v0.28.0/go.mod h1:U8nCwOR8jO/marOQ0QbDiOngZVEBB7MAiitBuMjXiNU=
golang.org/x/text v0.31.0 h1:aC8ghyu4JhP8VojJ2lEHBnochRno1sgL6nEi9WGFGMM=
golang.org/x/text v0.31.0/go.mod h1:tKRAlv61yKIjGGHX/4tP1LTbc13YSec1pxVEWXzfoeM=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
golang.org/x/tools v0.0.0-20190706070813-72ffa07ba3db/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI=
golang.org/x/tools v0.36.0 h1:kWS0uv/zsvHEle1LbV5LE8QujrxB3wfQyxHfhOk0Qkg=
golang.org/x/tools v0.36.0/go.mod h1:WBDiHKJK8YgLHlcQPYQzNCkUxUypCaa5ZegCVutKm+s=
golang.org/x/tools v0.38.0 h1:Hx2Xv8hISq8Lm16jvBZ2VQf+RLmbd7wVUsALibYI/IQ=
golang.org/x/tools v0.38.0/go.mod h1:yEsQ/d/YK8cjh0L6rZlY8tgtlKiBNTL14pGDJPJpYQs=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/protobuf v1.36.7 h1:IgrO7UwFQGJdRNXH/sQux4R1Dj1WAKcLElzeeRaXV2A=
google.golang.org/protobuf v1.36.7/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY=
Expand Down
50 changes: 50 additions & 0 deletions integration/v7/global/create_buildpack_command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ var _ = Describe("create buildpack command", func() {
AfterEach(func() {
err := os.RemoveAll(buildpackDir)
Expect(err).ToNot(HaveOccurred())
Eventually(helpers.CF("delete-buildpack", buildpackName, "-f")).Should(Exit(0))
})

When("zipping the directory errors", func() {
Expand Down Expand Up @@ -126,6 +127,10 @@ var _ = Describe("create buildpack command", func() {
})

When("specifying a valid path", func() {
AfterEach(func() {
Eventually(helpers.CF("delete-buildpack", buildpackName, "-f")).Should(Exit(0))
})

When("the new buildpack is unique", func() {
When("the new buildpack has a nil stack", func() {
It("successfully uploads a buildpack", func() {
Expand All @@ -146,6 +151,10 @@ var _ = Describe("create buildpack command", func() {
})

When("the new buildpack has a valid stack", func() {
AfterEach(func() {
Eventually(helpers.CF("delete-buildpack", buildpackName, "-s", stacks[0], "-f")).Should(Exit(0))
})

It("successfully uploads a buildpack", func() {
helpers.BuildpackWithStack(func(buildpackPath string) {
session := helpers.CF("create-buildpack", buildpackName, buildpackPath, "1")
Expand All @@ -166,6 +175,10 @@ var _ = Describe("create buildpack command", func() {
})

When("the new buildpack has an invalid stack", func() {
AfterEach(func() {
Eventually(helpers.CF("delete-buildpack", buildpackName, "-s", stacks[0], "-f")).Should(Exit(0))
})

It("returns the appropriate error", func() {
helpers.BuildpackWithStack(func(buildpackPath string) {
session := helpers.CF("create-buildpack", buildpackName, buildpackPath, "1")
Expand Down Expand Up @@ -196,6 +209,10 @@ var _ = Describe("create buildpack command", func() {
}, stacks[0])
})

AfterEach(func() {
Eventually(helpers.CF("delete-buildpack", buildpackName, "-s", stacks[0], "-f")).Should(Exit(0))
})

It("prints a warning and exits with an error", func() {
helpers.BuildpackWithStack(func(buildpackPath string) {
session := helpers.CF("create-buildpack", buildpackName, buildpackPath, "1")
Expand All @@ -218,6 +235,10 @@ var _ = Describe("create buildpack command", func() {
})
})

AfterEach(func() {
Eventually(helpers.CF("delete-buildpack", buildpackName, "-f")).Should(Exit(0))
})

It("prints a warning and exits with an error", func() {
helpers.BuildpackWithoutStack(func(buildpackPath string) {
session := helpers.CF("create-buildpack", buildpackName, buildpackPath, "1")
Expand All @@ -238,6 +259,11 @@ var _ = Describe("create buildpack command", func() {
}, stacks[1])
})

AfterEach(func() {
Eventually(helpers.CF("delete-buildpack", buildpackName, "-s", stacks[0], "-f")).Should(Exit(0))
Eventually(helpers.CF("delete-buildpack", buildpackName, "-s", stacks[1], "-f")).Should(Exit(0))
})

It("successfully uploads a buildpack", func() {
helpers.BuildpackWithStack(func(buildpackPath string) {
session := helpers.CF("create-buildpack", buildpackName, buildpackPath, "1")
Expand Down Expand Up @@ -265,6 +291,10 @@ var _ = Describe("create buildpack command", func() {
})
})

AfterEach(func() {
Eventually(helpers.CF("delete-buildpack", buildpackName, "-f")).Should(Exit(0))
})

It("prints a warning and tip, then exits with an error", func() {
helpers.BuildpackWithStack(func(buildpackPath string) {
session := helpers.CF("create-buildpack", buildpackName, buildpackPath, "1")
Expand All @@ -283,6 +313,10 @@ var _ = Describe("create buildpack command", func() {
}, stacks[0])
})

AfterEach(func() {
Eventually(helpers.CF("delete-buildpack", buildpackName, "-s", stacks[0], "-f")).Should(Exit(0))
})

It("prints a warning then exits with an error", func() {
helpers.BuildpackWithStack(func(buildpackPath string) {
session := helpers.CF("create-buildpack", buildpackName, buildpackPath, "1")
Expand All @@ -305,6 +339,10 @@ var _ = Describe("create buildpack command", func() {
When("specifying a valid path", func() {
When("the new buildpack is unique", func() {
When("the new buildpack has a nil stack", func() {
AfterEach(func() {
Eventually(helpers.CF("delete-buildpack", buildpackName, "-f")).Should(Exit(0))
})

It("successfully uploads a buildpack", func() {
helpers.CNB(func(buildpackPath string) {
session := helpers.CF("create-buildpack", buildpackName, buildpackPath, "1", "--lifecycle=cnb")
Expand Down Expand Up @@ -344,6 +382,10 @@ var _ = Describe("create buildpack command", func() {
buildpackURL = "https://github.com/cloudfoundry/binary-buildpack/releases/download/v1.0.21/binary-buildpack-v1.0.21.zip"
})

AfterEach(func() {
Eventually(helpers.CF("delete-buildpack", buildpackName, "-f")).Should(Exit(0))
})

It("successfully uploads a buildpack", func() {
session := helpers.CF("create-buildpack", buildpackName, buildpackURL, "1")
Eventually(session).Should(Say(`Creating buildpack %s as %s\.\.\.`, buildpackName, username))
Expand Down Expand Up @@ -400,6 +442,10 @@ var _ = Describe("create buildpack command", func() {

When("specifying the position flag", func() {
When("position is positive integer", func() {
AfterEach(func() {
Eventually(helpers.CF("delete-buildpack", buildpackName, "-f")).Should(Exit(0))
})

It("successfully uploads buildpack in correct position", func() {
helpers.BuildpackWithoutStack(func(buildpackPath string) {
session := helpers.CF("create-buildpack", buildpackName, buildpackPath, "3")
Expand All @@ -420,6 +466,10 @@ var _ = Describe("create buildpack command", func() {
})

When("specifying disable flag", func() {
AfterEach(func() {
Eventually(helpers.CF("delete-buildpack", buildpackName, "-f")).Should(Exit(0))
})

It("disables buildpack", func() {
helpers.BuildpackWithoutStack(func(buildpackPath string) {
session := helpers.CF("create-buildpack", buildpackName, buildpackPath, "1", "--disable")
Expand Down
13 changes: 13 additions & 0 deletions integration/v7/global/delete_buildpack_command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,11 @@ var _ = Describe("delete-buildpack command", func() {
}, stacks[1])
})

AfterEach(func() {
Eventually(helpers.CF("delete-buildpack", buildpackName, "-s", stacks[0], "-f")).Should(Exit(0))
Eventually(helpers.CF("delete-buildpack", buildpackName, "-s", stacks[1], "-f")).Should(Exit(0))
})

It("properly handles ambiguity", func() {
By("failing when no stack specified")

Expand Down Expand Up @@ -186,6 +191,10 @@ var _ = Describe("delete-buildpack command", func() {
Eventually(session).Should(Exit(0))
})
})
AfterEach(func() {
Eventually(helpers.CF("delete-buildpack", buildpackName, "-s", stacks[0], "-f")).Should(Exit(0))
Eventually(helpers.CF("delete-buildpack", buildpackName, "-f")).Should(Exit(0))
})

It("properly handles ambiguity", func() {
By("deleting the nil stack buildpack when no stack specified")
Expand Down Expand Up @@ -213,6 +222,10 @@ var _ = Describe("delete-buildpack command", func() {
})
})

AfterEach(func() {
Eventually(helpers.CF("delete-buildpack", buildpackName, "-f")).Should(Exit(0))
})

When("the user enters 'y'", func() {
BeforeEach(func() {
_, err := buffer.Write([]byte("y\n"))
Expand Down
Loading
Loading