Skip to content

Commit e8d41cf

Browse files
Juan Diego Gonzaleza-b
andcommitted
Refactoring route command integration test
Route command summary table shows the protocol when the cli points to CAPI with a version higher or equal to 3.104.0. V8's Minimum CAPI version is 3.99.0, therefore we need to skip the assertion of this protocol when the testuses CAPI minimum version. Co-authored-by: Alexander Berezovsky <[email protected]>
1 parent 67681a0 commit e8d41cf

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

integration/v7/isolated/route_command_test.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package isolated
33
import (
44
"fmt"
55

6+
"code.cloudfoundry.org/cli/api/cloudcontroller/ccversion"
67
. "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers"
78
"code.cloudfoundry.org/cli/integration/helpers"
89
. "github.com/onsi/ginkgo"
@@ -119,6 +120,12 @@ var _ = Describe("route command", func() {
119120
Eventually(session).Should(Say(`\n`))
120121
Eventually(session).Should(Say(`Destinations:`))
121122
Eventually(session).Should(Say(`\s+app\s+process\s+port\s+protocol`))
123+
Eventually(session).Should(Exit(0))
124+
})
125+
126+
It("displays the protocol in the route summary and exits without failing", func() {
127+
helpers.SkipIfVersionLessThan(ccversion.MinVersionHTTP2RoutingV3)
128+
session := helpers.CF("route", domainName, "--hostname", hostname, "--path", path)
122129
Eventually(session).Should(Say(`\s+killer\s+web\s+8080\s+http1`))
123130
Eventually(session).Should(Exit(0))
124131
})
@@ -161,6 +168,12 @@ var _ = Describe("route command", func() {
161168
Eventually(session).Should(Say(`\n`))
162169
Eventually(session).Should(Say(`Destinations:`))
163170
Eventually(session).Should(Say(`\s+app\s+process\s+port\s+protocol`))
171+
Eventually(session).Should(Exit(0))
172+
})
173+
174+
It("displays the protocol in the route summary and exits without failing", func() {
175+
helpers.SkipIfVersionLessThan(ccversion.MinVersionHTTP2RoutingV3)
176+
session := helpers.CF("route", tcpDomain.Name, "--port", fmt.Sprintf("%d", port))
164177
Eventually(session).Should(Say(`\s+killer\s+web\s+8080\s+tcp`))
165178
Eventually(session).Should(Exit(0))
166179
})

0 commit comments

Comments
 (0)