예제 #1
0
 public static void AzureEmulatorBVTClassInitialize(TestContext testContext)
 {
     //first set the storage account
     //second init common bvt
     //third set storage context in powershell
     SetUpStorageAccount = CloudStorageAccount.DevelopmentStorageAccount;
     CLICommonBVT.CLICommonBVTInitialize(testContext);
     PowerShellAgent.SetLocalStorageContext();
     StartStorageEmulator();
 }
 public static void EnvConnectionStringHTTPBVTClassInitialize(TestContext testContext)
 {
     //first set the storage account
     //second init common bvt
     //third set storage context in powershell
     useHttps            = false;
     SetUpStorageAccount = TestBase.GetCloudStorageAccountFromConfig(string.Empty, useHttps);
     CLICommonBVT.CLICommonBVTInitialize(testContext);
     System.Environment.SetEnvironmentVariable(EnvKey, SetUpStorageAccount.ToString(true));
 }
예제 #3
0
 public static void SubScriptionBVTClassInitialize(TestContext testContext)
 {
     useHttps = true;
     //first set the storage account
     //second init common bvt
     //third set storage context in powershell
     SetUpStorageAccount = TestBase.GetCloudStorageAccountFromConfig(useHttps: useHttps);
     CLICommonBVT.CLICommonBVTInitialize(testContext);
     SetupSubscription();
 }
        public static void ConnectionStringBVTClassInitialize(TestContext testContext)
        {
            //first set the storage account
            //second init common bvt
            //third set storage context in powershell
            SetUpStorageAccount = TestBase.GetCloudStorageAccountFromConfig();

            CLICommonBVT.CLICommonBVTInitialize(testContext);
            PowerShellAgent.SetStorageContext(SetUpStorageAccount.ToString(true));
            useHttps = true;
        }
예제 #5
0
        public static void SubScriptionBVTClassInitialize(TestContext testContext)
        {
            //first set the storage account
            //second init common bvt
            //third set storage context in powershell
            string ConnectionString = Test.Data.Get("StorageConnectionString");

            SetUpStorageAccount = CloudStorageAccount.Parse(ConnectionString);

            CLICommonBVT.CLICommonBVTInitialize(testContext);

            SetupSubscription();
        }
예제 #6
0
        public static void ConnectionStringHTTPBVTClassInitialize(TestContext testContext)
        {
            //first set the storage account
            //second init common bvt
            //third set storage context in powershell
            string ConnectionString = Test.Data.Get("HTTPConnectionString");

            SetUpStorageAccount = CloudStorageAccount.Parse(ConnectionString);

            CLICommonBVT.CLICommonBVTInitialize(testContext);
            PowerShellAgent.SetStorageContext(ConnectionString);
            useHttps = false;
        }
예제 #7
0
        public static void EnvConnectionStringHTTPBVTClassInitialize(TestContext testContext)
        {
            //first set the storage account
            //second init common bvt
            //third set storage context in powershell
            string ConnectionString = Test.Data.Get("HTTPEnvConnectionString");

            SetUpStorageAccount = CloudStorageAccount.Parse(ConnectionString);

            CLICommonBVT.CLICommonBVTInitialize(testContext);
            System.Environment.SetEnvironmentVariable(EnvKey, ConnectionString);
            useHttps = false;
        }
예제 #8
0
        public static void SecondaryEndPointBVTClassInitialize(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");

            CLICommonBVT.CLICommonBVTInitialize(testContext);
            PowerShellAgent.SetStorageContext(SetUpStorageAccount.ToString(true));
        }
예제 #9
0
        public static void NameKeyContextBVTClassInitialize(TestContext testContext)
        {
            //first set the storage account
            //second init common bvt
            //third set storage context in powershell
            StorageAccountName = Test.Data.Get("StorageAccountName");
            StorageAccountKey  = Test.Data.Get("StorageAccountKey");
            StorageCredentials credential = new StorageCredentials(StorageAccountName, StorageAccountKey);

            useHttps            = true;
            SetUpStorageAccount = new CloudStorageAccount(credential, useHttps);

            CLICommonBVT.CLICommonBVTInitialize(testContext);
            PowerShellAgent.SetStorageContext(StorageAccountName, StorageAccountKey, useHttps);
        }
예제 #10
0
        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);
        }
        public static void NameKeyContextHTTPBVTClassInitialize(TestContext testContext)
        {
            //first set the storage account
            //second init common bvt
            //third set storage context in powershell
            StorageAccountName = Test.Data.Get("StorageAccountName");
            string             StorageAccountKey = Test.Data.Get("StorageAccountKey");
            string             StorageEndPoint   = Test.Data.Get("StorageEndPoint");
            StorageCredentials credential        = new StorageCredentials(StorageAccountName, StorageAccountKey);

            useHttps            = false;
            isSecondary         = false;
            SetUpStorageAccount = Utility.GetStorageAccountWithEndPoint(credential, useHttps, StorageEndPoint);

            CLICommonBVT.CLICommonBVTInitialize(testContext);
            PowerShellAgent.SetStorageContext(StorageAccountName, StorageAccountKey, useHttps, StorageEndPoint);
        }
예제 #12
0
        public static void Initialize(TestContext testContext, bool useHttps)
        {
            //first set the storage account
            //second init common bvt
            //third set storage context in powershell
            string storageAccountName = Test.Data.Get("StorageAccountName");
            string storageAccountKey  = Test.Data.Get("StorageAccountKey");
            string storageEndPoint    = Test.Data.Get("StorageEndPoint");
            string connectionString   = Utility.GenConnectionString(storageAccountName, storageAccountKey, useHttps, storageEndPoint);

            SetUpStorageAccount = CloudStorageAccount.Parse(connectionString);

            CLICommonBVT.CLICommonBVTInitialize(testContext);

            if (lang == Language.PowerShell)
            {
                PowerShellAgent.SetStorageContext(connectionString);
            }
        }
예제 #13
0
        public static void ParamNameKeyBVTClassInitialize(TestContext testContext)
        {
            useHttps = true;
            //set the storage account
            SetUpStorageAccount = TestBase.GetCloudStorageAccountFromConfig(useHttps: useHttps);

            //second init common bvt
            CLICommonBVT.CLICommonBVTInitialize(testContext);

            //remove env connection string
            System.Environment.SetEnvironmentVariable(EnvKey, string.Empty);

            //set account name & key
            string StorageAccountName = Test.Data.Get("StorageAccountName");
            string StorageAccountKey  = Test.Data.Get("StorageAccountKey");

            NodeJSAgent.AgentConfig.AccountName = StorageAccountName;
            NodeJSAgent.AgentConfig.AccountKey  = StorageAccountKey;
            NodeJSAgent.AgentConfig.UseEnvVar   = false;
        }
예제 #14
0
        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");

            CLICommonBVT.CLICommonBVTInitialize(testContext);
            Agent.Context = SetUpStorageAccount;

            if (lang == Language.PowerShell)
            {
                PowerShellAgent.SetStorageContext(SetUpStorageAccount.ToString(true));
            }
            else
            {
                NodeJSAgent.AgentConfig.UseEnvVar   = false;
                NodeJSAgent.AgentConfig.AccountName = StorageAccountName;
                NodeJSAgent.AgentConfig.AccountKey  = SetUpStorageAccount.Credentials.ExportBase64EncodedKey();
            }
        }
예제 #15
0
파일: OauthBVT.cs 프로젝트: EmmaZhu/pshtest
 public static void OAuthBVTClassInitialize(TestContext testContext)
 {
     useHttps = true;
     CLICommonBVT.CLICommonBVTInitialize(testContext);
     SetupOAuth();
 }