QuickDeleteOrgIfExists deletes the org with the given name, if it exists, using 'cf curl /v3/organizations... -X DELETE'.
(orgName string)
| 130 | // QuickDeleteOrgIfExists deletes the org with the given name, if it exists, using |
| 131 | // 'cf curl /v3/organizations... -X DELETE'. |
| 132 | func QuickDeleteOrgIfExists(orgName string) { |
| 133 | session := CF("org", "--guid", orgName) |
| 134 | Eventually(session).Should(Exit()) |
| 135 | if session.ExitCode() != 0 { |
| 136 | return |
| 137 | } |
| 138 | guid := strings.TrimSpace(string(session.Out.Contents())) |
| 139 | url := fmt.Sprintf("/v3/organizations/%s", guid) |
| 140 | session = CF("curl", "-X", "DELETE", url) |
| 141 | Eventually(session).Should(Exit()) |
| 142 | } |
| 143 | |
| 144 | // QuickDeleteSpace deletes the space with the given name, if it exists, using |
| 145 | // 'cf curl /v3/spaces... -X DELETE'. |
no test coverage detected