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

Function SkipIfClientCredentialsNotSet

integration/helpers/client_credentials.go:13–22  ·  view source on GitHub ↗

SkipIfClientCredentialsNotSet will skip the test when either CF_INT_CLIENT_ID or CF_INT_CLIENT_SECRET are not set.

()

Source from the content-addressed store, hash-verified

11// SkipIfClientCredentialsNotSet will skip the test when either
12// CF_INT_CLIENT_ID or CF_INT_CLIENT_SECRET are not set.
13func SkipIfClientCredentialsNotSet() (string, string) {
14 privateClientID := os.Getenv("CF_INT_CLIENT_ID")
15 privateClientSecret := os.Getenv("CF_INT_CLIENT_SECRET")
16
17 if privateClientID == "" || privateClientSecret == "" {
18 Skip("CF_INT_CLIENT_ID or CF_INT_CLIENT_SECRET is not set")
19 }
20
21 return privateClientID, privateClientSecret
22}
23
24// SkipIfCustomClientCredentialsNotSet will skip the test when either
25// CF_INT_CUSTOM_CLIENT_ID or CF_INT_CUSTOM_CLIENT_SECRET are not set.

Calls

no outgoing calls

Tested by

no test coverage detected