public static void ClassInitialize(TestContext testContext, bool useHttps) { //first set the storage account //second init common bvt //third set storage context in powershell isSecondary = true; SetUpStorageAccount = TestBase.GetCloudStorageAccountFromConfig("Secondary", useHttps); StorageAccountName = SetUpStorageAccount.Credentials.AccountName; string StorageEndpoint = Test.Data.Get("SecondaryStorageEndPoint"); string StorageAccountKey = Test.Data.Get("SecondaryStorageAccountKey"); CLICommonBVT.CLICommonBVTInitialize(testContext); Agent.Context = SetUpStorageAccount; if (lang == Language.PowerShell) { string azureEnvironmentName = PowerShellAgent.AddRandomAzureEnvironment(StorageEndpoint, "bvt"); PowerShellAgent.SetStorageContextWithAzureEnvironment(StorageAccountName, StorageAccountKey, useHttps, azureEnvironmentName); } else { NodeJSAgent.AgentConfig.UseEnvVar = false; NodeJSAgent.AgentConfig.AccountName = StorageAccountName; NodeJSAgent.AgentConfig.AccountKey = StorageAccountKey; } }
public static void AzureEnvironmentBVTClassInitialize(TestContext testContext) { //first set the storage account //second init common bvt //third set storage context in powershell useHttps = true; isSecondary = true; SetUpStorageAccount = TestBase.GetCloudStorageAccountFromConfig("Secondary", useHttps); StorageAccountName = SetUpStorageAccount.Credentials.AccountName; string StorageEndpoint = Test.Data.Get("SecondaryStorageEndPoint"); string StorageAccountKey = Test.Data.Get("SecondaryStorageAccountKey"); CLICommonBVT.CLICommonBVTInitialize(testContext); azureEnvironmentName = PowerShellAgent.AddRandomAzureEnvironment(StorageEndpoint, "bvt"); PowerShellAgent.SetStorageContextWithAzureEnvironment(StorageAccountName, StorageAccountKey, useHttps, azureEnvironmentName); }