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

Function CreateUser

integration/helpers/user.go:99–112  ·  view source on GitHub ↗

CreateUser creates a user with a random username and password and returns both.

()

Source from the content-addressed store, hash-verified

97
98// CreateUser creates a user with a random username and password and returns both.
99func CreateUser() (string, string) {
100 username := NewUsername()
101 password := RandomName()
102
103 // env := map[string]string{
104 // "NEW_USER_PASSWORD": password,
105 // }
106
107 // session := CFWithEnv(env, "create-user", username, "$NEW_USER_PASSWORD")
108 session := CF("create-user", username, password)
109 Eventually(session).Should(Exit(0))
110
111 return username, password
112}
113
114// DeleteUser deletes the user specified by username.
115func DeleteUser(username string) {

Calls 3

NewUsernameFunction · 0.85
RandomNameFunction · 0.85
CFFunction · 0.85

Tested by

no test coverage detected