Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turn federated auth on for Identity tests. #5785

Merged
merged 3 commits into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ TEST(AzurePipelinesCredential, InvalidServiceConnectionId_LIVEONLY_)
}
}

TEST(AzurePipelinesCredential, InvalidSystemAccessToken_LIVEONLY_)
TEST(AzurePipelinesCredential, DISABLED_InvalidSystemAccessToken_LIVEONLY_)
{
std::string tenantId = Environment::GetVariable("AZURESUBSCRIPTION_TENANT_ID");
std::string clientId = Environment::GetVariable("AZURESUBSCRIPTION_CLIENT_ID");
Expand Down
12 changes: 12 additions & 0 deletions sdk/identity/azure-identity/test/ut/token_credential_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ using namespace Azure::Identity;

TEST_F(TokenCredentialTest, ClientSecret)
{
if (m_testContext.IsLiveMode())
{
GTEST_SKIP_(
"Skipping ClientSecret test since it requires env vars that aren't set in live mode.");
}

std::string const testName(GetTestName());
auto const clientSecretCredential = GetClientSecretCredential(testName);

Expand All @@ -71,6 +77,12 @@ TEST_F(TokenCredentialTest, ClientSecret)

TEST_F(TokenCredentialTest, EnvironmentCredential)
{
if (m_testContext.IsLiveMode())
{
GTEST_SKIP_("Skipping EnvironmentCredential test since it requires env vars that aren't set in "
"live mode.");
}

std::string const testName(GetTestName());
auto const clientSecretCredential = GetEnvironmentCredential(testName);

Expand Down
1 change: 1 addition & 0 deletions sdk/identity/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ extends:
LiveTestCtestRegex: azure-identity.
LineCoverageTarget: 95
BranchCoverageTarget: 56
UseFederatedAuth: true
ahsonkhan marked this conversation as resolved.
Show resolved Hide resolved
Artifacts:
- Name: azure-identity
Path: azure-identity
Expand Down
10 changes: 0 additions & 10 deletions sdk/identity/test-resources.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@
"metadata": {
"description": "The application client ID used to run tests."
}
},
"testApplicationSecret": {
"type": "string",
"metadata": {
"description": "The application client secret used to run tests."
}
}
},
"resources": [],
Expand All @@ -31,10 +25,6 @@
"AZURE_CLIENT_ID": {
"type": "string",
"value": "[parameters('testApplicationId')]"
},
"AZURE_CLIENT_SECRET": {
"type": "string",
"value": "[parameters('testApplicationSecret')]"
}
}
}