Skip to content

Commit adc02f3

Browse files
committed
test: name the whole credential variable, not its prefix
Three cases asserted $FLAGSMITH_API_KEY where the CLI prints the host-scoped name in full. The prefix matches either spelling, so they would not have noticed the scoping being dropped — which is the thing that keeps a credential from following a redirected apiUrl. beep boop
1 parent 0f55f60 commit adc02f3

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

internal/cmd/testdata/script/credentials.txtar

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ stderr 'FLAGSMITH_ACCESS_TOKEN'
2525
env $API_KEY_VAR=$MASTER_KEY
2626
env $TOKEN_VAR=$BEARER_TOKEN
2727
exec flagsmith auth status
28-
stdout '\$FLAGSMITH_API_KEY'
28+
stdout '\$'$API_KEY_VAR
2929

3030
# Given: a server-side key offered in the variable meant for Master API keys
3131
# When: the credential is described
@@ -40,7 +40,7 @@ stderr 'FLAGSMITH_ENVIRONMENT_KEY'
4040
# Then: the environment wins, and says so
4141
env $API_KEY_VAR=$MASTER_KEY
4242
exec flagsmith auth status
43-
stdout '\$FLAGSMITH_API_KEY'
43+
stdout '\$'$API_KEY_VAR
4444

4545
# Given: an expired OAuth credential in the keychain, and no environment credential
4646
# When: a command refreshes it
@@ -57,7 +57,7 @@ env $API_KEY_VAR=$MASTER_KEY
5757
exec flagsmith auth status
5858
stdout 'Master API key'
5959
stdout 'Acme'
60-
stdout '\$FLAGSMITH_API_KEY'
60+
stdout '\$'$API_KEY_VAR
6161
exec flagsmith auth token
6262
stdout '^'$MASTER_KEY'$'
6363

0 commit comments

Comments
 (0)