Skip to content

Commit

Permalink
Toggle commented codes so that most tests can pass
Browse files Browse the repository at this point in the history
  • Loading branch information
johnhuang01 committed Jan 7, 2022
1 parent 8e1be98 commit 7ec50ec
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public abstract class PersonalizerTestBase : RecordedTestBase<PersonalizerTestEn
{
public static bool IsTestTenant = false;

public PersonalizerTestBase(bool isAsync): base(isAsync)
public PersonalizerTestBase(bool isAsync) : base(isAsync)
{
// TODO: Compare bodies again when https://github.com/Azure/azure-sdk-for-net/issues/22219 is resolved.
Matcher = new RecordMatcher(compareBodies: false);
Expand All @@ -21,10 +21,10 @@ public PersonalizerTestBase(bool isAsync): base(isAsync)

protected async Task<PersonalizerClient> GetPersonalizerClientAsync(bool isSingleSlot = false, bool isLocalInference = false)
{
//string endpoint = isSingleSlot ? TestEnvironment.SingleSlotEndpoint : TestEnvironment.MultiSlotEndpoint;
//string apiKey = isSingleSlot ? TestEnvironment.SingleSlotApiKey : TestEnvironment.MultiSlotApiKey;
string endpoint = isSingleSlot ? "https://autoopte2etest3.ppe.cognitiveservices.azure.com" : TestEnvironment.MultiSlotEndpoint;
string apiKey = isSingleSlot ? "{personalizerApiKey}" : TestEnvironment.MultiSlotApiKey;
string endpoint = isSingleSlot ? TestEnvironment.SingleSlotEndpoint : TestEnvironment.MultiSlotEndpoint;
string apiKey = isSingleSlot ? TestEnvironment.SingleSlotApiKey : TestEnvironment.MultiSlotApiKey;
//string endpoint = isSingleSlot ? "https://autoopte2etest3.ppe.cognitiveservices.azure.com" : TestEnvironment.MultiSlotEndpoint;
//string apiKey = isSingleSlot ? "{personalizerApiKey}" : TestEnvironment.MultiSlotApiKey;
PersonalizerAdministrationClient adminClient = GetAdministrationClient(isSingleSlot);
if (!isSingleSlot)
{
Expand Down Expand Up @@ -70,10 +70,10 @@ protected async Task<PersonalizerClient> GetPersonalizerClientAsync(bool isSingl

protected PersonalizerAdministrationClient GetAdministrationClient(bool isSingleSlot = false)
{
//string endpoint = isSingleSlot ? TestEnvironment.SingleSlotEndpoint : TestEnvironment.MultiSlotEndpoint;
//string apiKey = isSingleSlot ? TestEnvironment.SingleSlotApiKey : TestEnvironment.MultiSlotApiKey;
string endpoint = isSingleSlot ? "https://autoopte2etest3.ppe.cognitiveservices.azure.com" : TestEnvironment.MultiSlotEndpoint;
string apiKey = isSingleSlot ? "{personalizerApiKey}" : TestEnvironment.MultiSlotApiKey;
string endpoint = isSingleSlot ? TestEnvironment.SingleSlotEndpoint : TestEnvironment.MultiSlotEndpoint;
string apiKey = isSingleSlot ? TestEnvironment.SingleSlotApiKey : TestEnvironment.MultiSlotApiKey;
//string endpoint = isSingleSlot ? "https://autoopte2etest3.ppe.cognitiveservices.azure.com" : TestEnvironment.MultiSlotEndpoint;
//string apiKey = isSingleSlot ? "{personalizerApiKey}" : TestEnvironment.MultiSlotApiKey;
var credential = new AzureKeyCredential(apiKey);
var options = InstrumentClientOptions(new PersonalizerClientOptions());
PersonalizerAdministrationClient personalizerAdministrationClient = new PersonalizerAdministrationClient(new Uri(endpoint), credential, options);
Expand Down

0 comments on commit 7ec50ec

Please sign in to comment.