Skip to content

Commit 74ab910

Browse files
authored
[main] Fix CI client-creds integration tests (#3797)
* Fix(ci): add flake-attempts to client-creds integration test target * Fix: prevent 'cf apps' failure on empty API version
1 parent dc32dce commit 74ab910

3 files changed

Lines changed: 21 additions & 1 deletion

File tree

Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,13 @@ integration-selfcontained: build install-test-deps
135135

136136
integration-tests: build integration-cleanup integration-isolated integration-push integration-global integration-selfcontained ## Run all isolated, push, selfcontained, and global integration tests
137137

138-
integration-tests-ci-client-creds: build integration-cleanup integration-push integration-global integration-selfcontained
138+
integration-tests-ci-client-creds: build install-test-deps integration-cleanup
139+
$(ginkgo_int) -nodes $(NODES) -flake-attempts $(FLAKE_ATTEMPTS) \
140+
integration/v7/push
141+
$(ginkgo_int) -flake-attempts $(FLAKE_ATTEMPTS) \
142+
integration/shared/global integration/v7/global
143+
$(ginkgo_int) -nodes $(NODES) -flake-attempts $(FLAKE_ATTEMPTS) \
144+
integration/v7/selfcontained
139145

140146
i: integration-tests-full
141147
integration-full-tests: integration-tests-full

actor/versioncheck/minimum_version_check.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ func IsMinimumAPIVersionMet(current string, minimum string) (bool, error) {
88
if minimum == "" {
99
return true, nil
1010
}
11+
if current == "" {
12+
return false, nil
13+
}
1114

1215
currentSemver, err := semver.Make(current)
1316
if err != nil {

actor/versioncheck/minimum_version_check_test.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,17 @@ var _ = Describe("IsMinimumAPIVersionMet", func() {
5656
})
5757
})
5858

59+
Context("current version is empty", func() {
60+
BeforeEach(func() {
61+
currentVersion = ""
62+
})
63+
64+
It("returns false with no errors", func() {
65+
Expect(minAPIVersionMet).To(Equal(false))
66+
Expect(executeErr).ToNot(HaveOccurred())
67+
})
68+
})
69+
5970
Context("current version is less than min", func() {
6071
BeforeEach(func() {
6172
currentVersion = "3.22.0"

0 commit comments

Comments
 (0)