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

Function SwitchToOrgRole

integration/helpers/login.go:191–196  ·  view source on GitHub ↗

SwitchToOrgRole logs out of the CLI and logs back in as a newly-created user with the given org role in the given org.

(org, role string)

Source from the content-addressed store, hash-verified

189// SwitchToOrgRole logs out of the CLI and logs back in as a newly-created user with the given
190// org role in the given org.
191func SwitchToOrgRole(org, role string) string {
192 username, password := CreateUserInOrgRole(org, role)
193 LogoutCF()
194 LoginAs(username, password)
195 return username
196}
197
198// SwitchToSpaceRole logs out of the CLI and logs back in as a newly-created user with the given
199// space role in the given space and org.

Calls 3

CreateUserInOrgRoleFunction · 0.85
LogoutCFFunction · 0.85
LoginAsFunction · 0.85

Tested by

no test coverage detected