Turn federated auth on for Identity tests. (#5785)

* Turn federated auth on for Identity tests.

* Update test resources json.
This commit is contained in:
Ahson Khan 2024-07-11 20:00:15 -04:00 committed by GitHub
parent 69ce3d7cfa
commit aadeca2c5c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 14 additions and 11 deletions

View File

@ -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");

View File

@ -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);
@ -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);

View File

@ -30,6 +30,7 @@ extends:
LiveTestCtestRegex: azure-identity.
LineCoverageTarget: 95
BranchCoverageTarget: 56
UseFederatedAuth: true
Artifacts:
- Name: azure-identity
Path: azure-identity

View File

@ -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": [],
@ -31,10 +25,6 @@
"AZURE_CLIENT_ID": {
"type": "string",
"value": "[parameters('testApplicationId')]"
},
"AZURE_CLIENT_SECRET": {
"type": "string",
"value": "[parameters('testApplicationSecret')]"
}
}
}