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

Function QuickDeleteOrg

integration/helpers/org_and_space.go:116–128  ·  view source on GitHub ↗

QuickDeleteOrg deletes the org with the given name, if provided, using 'cf curl /v3/organizations... -X DELETE'.

(orgName string)

Source from the content-addressed store, hash-verified

114// QuickDeleteOrg deletes the org with the given name, if provided, using
115// 'cf curl /v3/organizations... -X DELETE'.
116func QuickDeleteOrg(orgName string) {
117 // If orgName is empty, the BeforeSuite has failed and attempting to delete
118 // will produce a meaningless error.
119 if orgName == "" {
120 fmt.Println("Empty org name. Skipping deletion.")
121 return
122 }
123
124 guid := GetOrgGUID(orgName)
125 url := fmt.Sprintf("/v3/organizations/%s", guid)
126 session := CF("curl", "-X", "DELETE", url)
127 Eventually(session).Should(Exit(0))
128}
129
130// QuickDeleteOrgIfExists deletes the org with the given name, if it exists, using
131// 'cf curl /v3/organizations... -X DELETE'.

Calls 3

GetOrgGUIDFunction · 0.85
CFFunction · 0.85
PrintlnMethod · 0.65

Tested by

no test coverage detected