MCPcopy Create free account
hub / github.com/cloudfoundry/cli / SkipIfOIDCCredentialsNotSet

Function SkipIfOIDCCredentialsNotSet

integration/helpers/login.go:123–132  ·  view source on GitHub ↗

SkipIfOIDCCredentialsNotSet returns back the username and the password for OIDC origin, or skips the test if those values are not set.

()

Source from the content-addressed store, hash-verified

121// SkipIfOIDCCredentialsNotSet returns back the username and the password for
122// OIDC origin, or skips the test if those values are not set.
123func SkipIfOIDCCredentialsNotSet() (string, string) {
124 oidcUsername := os.Getenv("CF_INT_OIDC_USERNAME")
125 oidcPassword := os.Getenv("CF_INT_OIDC_PASSWORD")
126
127 if oidcUsername == "" || oidcPassword == "" {
128 Skip("CF_INT_OIDC_USERNAME or CF_INT_OIDC_PASSWORD is not set")
129 }
130
131 return oidcUsername, oidcPassword
132}
133
134// LogoutCF logs out of the CLI.
135func LogoutCF() {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected