Skip to content

Commit 0e5aa1e

Browse files
committed
Set MinVersionRoutePolicies to the released CAPI version 3.224.0
capi-release 1.239.0 (https://github.com/cloudfoundry/capi-release/releases/tag/1.239.0) ships RFC0055 Identity-Aware Routing with CC API version 3.224.0. Replace the 3.221.0 guess with the confirmed value, drop the now-obsolete placeholder guard test, and have the command tests reference the constant instead of a hardcoded string so they can't drift from it again.
1 parent f2fdd85 commit 0e5aa1e

4 files changed

Lines changed: 9 additions & 32 deletions

File tree

api/cloudcontroller/ccversion/minimum_version.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ const (
2929

3030
MinVersionUpdateStack = "3.211.0"
3131

32-
// MinVersionRoutePolicies is a placeholder until the CAPI team confirms the
33-
// version that introduces /v3/route_policies and the enforce_route_policies /
34-
// route_policies_scope domain fields. Replace "3.999.0" with the real version
35-
// once known. The test in minimum_version_test.go will keep failing until then.
36-
MinVersionRoutePolicies = "3.221.0"
32+
// MinVersionRoutePolicies is the CC API version that introduces
33+
// /v3/route_policies and the enforce_route_policies / route_policies_scope
34+
// domain fields (RFC0055 Identity-Aware Routing), as shipped in
35+
// capi-release 1.239.0.
36+
MinVersionRoutePolicies = "3.224.0"
3737
)

api/cloudcontroller/ccversion/minimum_version_test.go

Lines changed: 0 additions & 25 deletions
This file was deleted.

command/v7/add_route_policy_command_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55

66
"code.cloudfoundry.org/cli/v8/actor/actionerror"
77
"code.cloudfoundry.org/cli/v8/actor/v7action"
8+
"code.cloudfoundry.org/cli/v8/api/cloudcontroller/ccversion"
89
"code.cloudfoundry.org/cli/v8/command/commandfakes"
910
"code.cloudfoundry.org/cli/v8/command/flag"
1011
"code.cloudfoundry.org/cli/v8/command/translatableerror"
@@ -63,7 +64,7 @@ var _ = Describe("add-route-policy Command", func() {
6364
It("returns an error", func() {
6465
Expect(executeErr).To(MatchError(translatableerror.MinimumCFAPIVersionNotMetError{
6566
CurrentVersion: "0.0.0",
66-
MinimumVersion: "3.221.0",
67+
MinimumVersion: ccversion.MinVersionRoutePolicies,
6768
}))
6869
})
6970
})

command/v7/remove_route_policy_command_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55

66
"code.cloudfoundry.org/cli/v8/actor/actionerror"
77
"code.cloudfoundry.org/cli/v8/actor/v7action"
8+
"code.cloudfoundry.org/cli/v8/api/cloudcontroller/ccversion"
89
"code.cloudfoundry.org/cli/v8/command/commandfakes"
910
"code.cloudfoundry.org/cli/v8/command/flag"
1011
"code.cloudfoundry.org/cli/v8/command/translatableerror"
@@ -66,7 +67,7 @@ var _ = Describe("remove-route-policy Command", func() {
6667
It("returns an error", func() {
6768
Expect(executeErr).To(MatchError(translatableerror.MinimumCFAPIVersionNotMetError{
6869
CurrentVersion: "0.0.0",
69-
MinimumVersion: "3.221.0",
70+
MinimumVersion: ccversion.MinVersionRoutePolicies,
7071
}))
7172
})
7273
})

0 commit comments

Comments
 (0)