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

Function DeleteBuildpackIfOnOldCCAPI

integration/helpers/buildpack.go:140–146  ·  view source on GitHub ↗

DeleteBuildpackIfOnOldCCAPI deletes the buildpack if the CC API targeted by the current test run is <= 2.80.0. Before this version, some entities would receive and invalid next_url in paginated requests. Since our test run now generally creates more than 50 buildpacks, we need to delete test buildpa

(buildpackName string)

Source from the content-addressed store, hash-verified

138// after use if we are targeting an older CC API.
139// see https://github.com/cloudfoundry/capi-release/releases/tag/1.45.0
140func DeleteBuildpackIfOnOldCCAPI(buildpackName string) {
141 minVersion := "2.99.0"
142 if !IsVersionMet(minVersion) {
143 deleteSessions := CF("delete-buildpack", buildpackName, "-f")
144 Eventually(deleteSessions).Should(Exit())
145 }
146}
147
148type Buildpack struct {
149 GUID string `json:"guid"`

Calls 2

IsVersionMetFunction · 0.85
CFFunction · 0.85

Tested by

no test coverage detected