Skip to content

Commit

Permalink
Investigate behavior of AzurePipelinesCredential with invalid system …
Browse files Browse the repository at this point in the history
…access token
  • Loading branch information
ahsonkhan authored Sep 19, 2024
1 parent 39d3aaa commit 2ae7185
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions sdk/azidentity/azure_pipelines_credential_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func TestAzurePipelinesCredential(t *testing.T) {
}
clientID := os.Getenv("AZURESUBSCRIPTION_CLIENT_ID")
connectionID := os.Getenv("AZURESUBSCRIPTION_SERVICE_CONNECTION_ID")
systemAccessToken := os.Getenv("SYSTEM_ACCESSTOKEN")
systemAccessToken := "invalidSystemAccessToken"
tenantID := os.Getenv("AZURESUBSCRIPTION_TENANT_ID")
unset := []string{}
if clientID == "" {
Expand All @@ -75,7 +75,6 @@ func TestAzurePipelinesCredential(t *testing.T) {
t.Skip("no value for ", strings.Join(unset, ", "))
}
cred, err := NewAzurePipelinesCredential(tenantID, clientID, connectionID, systemAccessToken, nil)
require.NoError(t, err)
testGetTokenSuccess(t, cred)
require.ErrorContains(t, err, "302 (Found)")
})
}

0 comments on commit 2ae7185

Please sign in to comment.