Skip to content

Commit

Permalink
Updated tests after migrating test subscription to new Dogfood tenant (
Browse files Browse the repository at this point in the history
…#4282)

* Update WwwAuthenticateParametersIntegrationTests.cs

* Update OnBehalfOfServicePrincipalTests.cs

* Update ConfidentialAppSettings.cs

* Update OnBehalfOfServicePrincipalTests.cs
  • Loading branch information
abatishchev authored Aug 2, 2023
1 parent 0159748 commit 73ce337
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -61,7 +60,7 @@ public async Task CreateWwwAuthenticateResponseFromGraphUrlAsync()
/// <param name="tenantId">Expected Tenant ID</param>
[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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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";

Expand Down Expand Up @@ -159,10 +160,13 @@ public string GetSecret()

private static Lazy<IConfidentialAppSettings> s_publicCloudSettings =
new Lazy<IConfidentialAppSettings>(() => new PublicCloudConfidentialAppSettings());

private static Lazy<IConfidentialAppSettings> s_ppeCloudSettings =
new Lazy<IConfidentialAppSettings>(() => new PpeConfidentialAppSettings());

private static Lazy<IConfidentialAppSettings> s_arlingtonCloudSettings =
new Lazy<IConfidentialAppSettings>(() => new ArlingtonConfidentialAppSettings());

private static Lazy<IConfidentialAppSettings> s_adfsCloudSettings =
new Lazy<IConfidentialAppSettings>(() => new AdfsConfidentialAppSettings());

Expand Down

0 comments on commit 73ce337

Please sign in to comment.