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

Function CreateUserInSpaceRole

integration/helpers/user.go:133–140  ·  view source on GitHub ↗

CreateUserInSpaceRole creates a user with a random username and password and gives them the specified role within a specific space. The new user's username and password are returned.

(org, space, role string)

Source from the content-addressed store, hash-verified

131// CreateUserInSpaceRole creates a user with a random username and password and gives them the specified role within
132// a specific space. The new user's username and password are returned.
133func CreateUserInSpaceRole(org, space, role string) (string, string) {
134 username, password := CreateUser()
135
136 session := CF("set-space-role", username, org, space, role)
137 Eventually(session).Should(Exit(0))
138
139 return username, password
140}

Callers 2

SwitchToSpaceRoleFunction · 0.85

Calls 2

CFFunction · 0.85
CreateUserFunction · 0.70

Tested by

no test coverage detected