Skip to content

Commit

Permalink
update appconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
zzhxiaofeng committed Aug 4, 2021
1 parent f035647 commit d849a28
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@ describe("Authentication", () => {
});

it("token authentication works", async function() {
switch (process.env["AZURE_AUTHORITY_HOST"]) {
case "https://login.microsoftonline.us":
credsAndEndpoint.endpoint = credsAndEndpoint.endpoint.toString().replace(".azconfig.io", ".azconfig.azure.us");
break;
case "https://login.chinacloudapi.cn":
credsAndEndpoint.endpoint = credsAndEndpoint.endpoint.toString().replace(".azconfig.io", ".azconfig.azure.cn");
break;
}

const client = new AppConfigurationClient(
credsAndEndpoint.endpoint,
credsAndEndpoint.credential
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,6 @@ export interface CredsAndEndpoint {
}

export function startRecorder(that: Mocha.Context): Recorder {
switch (env["AZURE_AUTHORITY_HOST"]) {
case "https://login.microsoftonline.us":
env["AZ_CONFIG_ENDPOINT"] = env["AZ_CONFIG_ENDPOINT"].toString().replace(".azconfig.io", ".azconfig.azure.us");
break;
case "https://login.chinacloudapi.cn":
env["AZ_CONFIG_ENDPOINT"] = env["AZ_CONFIG_ENDPOINT"].toString().replace(".azconfig.io", ".azconfig.azure.cn");
break;
}

const recorderEnvSetup: RecorderEnvironmentSetup = {
replaceableVariables: {
APPCONFIG_CONNECTION_STRING:
Expand Down

0 comments on commit d849a28

Please sign in to comment.