SetupReadOnlyOrgAndSpace creates a randomly-named org containing two randomly-named spaces. It creates a new CF_HOME directory to run these commands, then deletes it afterwards.
()
| 12 | // spaces. It creates a new CF_HOME directory to run these commands, then deletes it |
| 13 | // afterwards. |
| 14 | func SetupReadOnlyOrgAndSpace() (string, string) { |
| 15 | homeDir := SetHomeDir() |
| 16 | SetAPI() |
| 17 | LoginCF() |
| 18 | orgName := NewOrgName() |
| 19 | spaceName1 := NewSpaceName() |
| 20 | spaceName2 := NewSpaceName() |
| 21 | Eventually(CF("create-org", orgName)).Should(Exit(0)) |
| 22 | Eventually(CF("create-space", spaceName1, "-o", orgName)).Should(Exit(0)) |
| 23 | Eventually(CF("create-space", spaceName2, "-o", orgName)).Should(Exit(0)) |
| 24 | DestroyHomeDir(homeDir) |
| 25 | return orgName, spaceName1 |
| 26 | } |
| 27 | |
| 28 | // CreateAndTargetOrg creates a randomly-named org and targets it. |
| 29 | func CreateAndTargetOrg() string { |
no test coverage detected