From 73ce337740964df4e8d197744a6e94304f49a372 Mon Sep 17 00:00:00 2001 From: Alexander Batishchev Date: Tue, 1 Aug 2023 21:30:06 -0700 Subject: [PATCH] Updated tests after migrating test subscription to new Dogfood tenant (#4282) * Update WwwAuthenticateParametersIntegrationTests.cs * Update OnBehalfOfServicePrincipalTests.cs * Update ConfidentialAppSettings.cs * Update OnBehalfOfServicePrincipalTests.cs --- .../WwwAuthenticateParametersIntegrationTests.cs | 3 +-- .../Infrastructure/ConfidentialAppSettings.cs | 6 +++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/Microsoft.Identity.Test.Integration.netfx/HeadlessTests/WwwAuthenticateParametersIntegrationTests.cs b/tests/Microsoft.Identity.Test.Integration.netfx/HeadlessTests/WwwAuthenticateParametersIntegrationTests.cs index 68821ae763..7d952a926d 100644 --- a/tests/Microsoft.Identity.Test.Integration.netfx/HeadlessTests/WwwAuthenticateParametersIntegrationTests.cs +++ b/tests/Microsoft.Identity.Test.Integration.netfx/HeadlessTests/WwwAuthenticateParametersIntegrationTests.cs @@ -29,7 +29,6 @@ public class WwwAuthenticateParametersIntegrationTests [TestMethod] public async Task CreateWwwAuthenticateResponseFromKeyVaultUrlAsync() { - var authParams = await WwwAuthenticateParameters.CreateFromResourceResponseAsync("https://buildautomation.vault.azure.net/secrets/CertName/CertVersion").ConfigureAwait(false); Assert.AreEqual("login.microsoftonline.com", new Uri(authParams.Authority).Host); @@ -61,7 +60,7 @@ public async Task CreateWwwAuthenticateResponseFromGraphUrlAsync() /// Expected Tenant ID [TestMethod] [DataRow("management.azure.com", "c1686c51-b717-4fe0-9af3-24a20a41fb0c", "login.windows.net", "72f988bf-86f1-41af-91ab-2d7cd011db47")] - [DataRow("api-dogfood.resources.windows-int.net", "1835ad3d-4585-4c5f-b55a-b0c3cbda1103", "login.windows-ppe.net", "f686d426-8d16-42db-81b7-ab578e110ccd")] + [DataRow("api-dogfood.resources.windows-int.net", "1835ad3d-4585-4c5f-b55a-b0c3cbda1103", "login.windows-ppe.net", "94430a9c-83e9-4f08-bbb0-64fccd0661fc")] public async Task CreateWwwAuthenticateResponseFromAzureResourceManagerUrlAsync(string hostName, string subscriptionId, string authority, string tenantId) { const string apiVersion = "2020-08-01"; // current latest API version for /subscriptions/get diff --git a/tests/Microsoft.Identity.Test.Integration.netfx/Infrastructure/ConfidentialAppSettings.cs b/tests/Microsoft.Identity.Test.Integration.netfx/Infrastructure/ConfidentialAppSettings.cs index 314ee97e05..f9387a17f6 100644 --- a/tests/Microsoft.Identity.Test.Integration.netfx/Infrastructure/ConfidentialAppSettings.cs +++ b/tests/Microsoft.Identity.Test.Integration.netfx/Infrastructure/ConfidentialAppSettings.cs @@ -50,6 +50,7 @@ private class PublicCloudConfidentialAppSettings : IConfidentialAppSettings public Cloud Cloud => Cloud.Public; public bool UseAppIdUri { get; set; } + public bool InstanceDiscoveryEndpoint { get; set; } = true; public X509Certificate2 GetCertificate() @@ -104,7 +105,7 @@ private class PpeConfidentialAppSettings : IConfidentialAppSettings { public string ClientId => UseAppIdUri? "api://microsoft.identity.9793041b-9078-4942-b1d2-babdc472cc0c" : "9793041b-9078-4942-b1d2-babdc472cc0c"; - public string TenantId => "f686d426-8d16-42db-81b7-ab578e110ccd"; + public string TenantId => "94430a9c-83e9-4f08-bbb0-64fccd0661fc"; public string Environment => "login.windows-ppe.net"; @@ -159,10 +160,13 @@ public string GetSecret() private static Lazy s_publicCloudSettings = new Lazy(() => new PublicCloudConfidentialAppSettings()); + private static Lazy s_ppeCloudSettings = new Lazy(() => new PpeConfidentialAppSettings()); + private static Lazy s_arlingtonCloudSettings = new Lazy(() => new ArlingtonConfidentialAppSettings()); + private static Lazy s_adfsCloudSettings = new Lazy(() => new AdfsConfidentialAppSettings());