MCPcopy
hub / github.com/cloudfoundry/cli / SkipIfVersionLessThan

Function SkipIfVersionLessThan

integration/helpers/version.go:103–112  ·  view source on GitHub ↗

SkipIfVersionLessThan is used to skip tests if the API version < the specified version. If minVersion contains the prefix 3 then the v3 version is checked, otherwise the v2 version is used.

(minVersion string)

Source from the content-addressed store, hash-verified

101// SkipIfVersionLessThan is used to skip tests if the API version < the specified version. If
102// minVersion contains the prefix 3 then the v3 version is checked, otherwise the v2 version is used.
103func SkipIfVersionLessThan(minVersion string) {
104 if ignoreAPIVersion() {
105 return
106 }
107
108 version := matchMajorAPIVersion(minVersion)
109 if !IsVersionMet(minVersion) {
110 Skip(fmt.Sprintf("minimum version %s not met by API version %s", minVersion, version))
111 }
112}
113
114// SkipIfVersionLessThan is used to skip tests if the API version >= the specified version. If
115// maxVersion contains the prefix 3 then the v3 version is checked, otherwise the v2 version is used.

Calls 3

ignoreAPIVersionFunction · 0.85
matchMajorAPIVersionFunction · 0.85
IsVersionMetFunction · 0.85

Tested by

no test coverage detected