public CommonTestFixture(MockContext contextToUse, bool createWasbAccount = false, bool isDogfood = false)
        {
            if (isDogfood)
            {
                Location = "Brazil South";
            }

            try
            {
                context = contextToUse;
                DataLakeAnalyticsManagementHelper = new DataLakeAnalyticsManagementHelper(this, context);
                DataLakeAnalyticsManagementHelper.TryRegisterSubscriptionForResource();
                DataLakeAnalyticsManagementHelper.TryRegisterSubscriptionForResource("Microsoft.Storage");
                DataLakeAnalyticsManagementHelper.TryRegisterSubscriptionForResource("Microsoft.DataLakeStore");
                ResourceGroupName                  = TestUtilities.GenerateName("rgaba1");
                DataLakeAnalyticsAccountName       = TestUtilities.GenerateName("testaba1");
                SecondDataLakeAnalyticsAccountName = TestUtilities.GenerateName("testaba2");
                SecondDataLakeStoreAccountName     = TestUtilities.GenerateName("teststorage1");
                DataLakeStoreAccountName           = TestUtilities.GenerateName("testdatalake1");
                SecondDataLakeStoreAccountName     = TestUtilities.GenerateName("testdatalake2");
                StorageAccountName                 = TestUtilities.GenerateName("testazureblob1");
                DatabaseName   = TestUtilities.GenerateName("testdb1");
                TableName      = TestUtilities.GenerateName("testtbl1");
                TvfName        = TestUtilities.GenerateName("testtvf1");
                ProcName       = TestUtilities.GenerateName("testproc1");
                ViewName       = TestUtilities.GenerateName("testview1");
                CredentialName = TestUtilities.GenerateName("testcred1");
                SecretName     = TestUtilities.GenerateName("testsecret1");
                SecretPwd      = TestUtilities.GenerateName("testsecretpwd1");
                DataLakeAnalyticsManagementHelper.TryCreateResourceGroup(ResourceGroupName, Location);
                if (createWasbAccount)
                {
                    string storageSuffix;
                    this.StorageAccountAccessKey = DataLakeAnalyticsManagementHelper.TryCreateStorageAccount(this.ResourceGroupName, this.StorageAccountName, "DataLakeAnalyticsTestStorage", "DataLakeAnalyticsTestStorageDescription", this.Location, out storageSuffix);
                    this.StorageAccountSuffix    = storageSuffix;
                }

                this.DataLakeStoreAccountSuffix       = DataLakeAnalyticsManagementHelper.TryCreateDataLakeStoreAccount(this.ResourceGroupName, this.Location, this.DataLakeStoreAccountName);
                this.SecondDataLakeStoreAccountSuffix = DataLakeAnalyticsManagementHelper.TryCreateDataLakeStoreAccount(this.ResourceGroupName, this.Location, this.SecondDataLakeStoreAccountName);
            }
            catch
            {
                Cleanup();
                throw;
            }
        }
        public CommonTestFixture()
        {
            var bigAnalyticsManagementHelper = new DataLakeAnalyticsManagementHelper(this);
            bigAnalyticsManagementHelper.TryRegisterSubscriptionForResource();
            bigAnalyticsManagementHelper.TryRegisterSubscriptionForResource("Microsoft.Storage");
            bigAnalyticsManagementHelper.TryRegisterSubscriptionForResource("Microsoft.DataLake");
            ResourceGroupName = TestUtilities.GenerateName("rgaba1");
            DataLakeAnalyticsAccountName = TestUtilities.GenerateName("testaba1");
            SecondDataLakeStoreAccountName = TestUtilities.GenerateName("teststorage1");
            DataLakeStoreAccountName = TestUtilities.GenerateName("testdatalake1");
            SecondDataLakeStoreAccountName = TestUtilities.GenerateName("testdatalake2");
            StorageAccountName = TestUtilities.GenerateName("testazureblob1");
            bigAnalyticsManagementHelper.TryCreateResourceGroup(ResourceGroupName, Location);
            
            string storageSuffix;
            this.StorageAccountAccessKey = bigAnalyticsManagementHelper.TryCreateStorageAccount(this.ResourceGroupName, this.StorageAccountName, "DataLakeAnalyticsTestStorage", "DataLakeAnalyticsTestStorageDescription", this.Location, out storageSuffix);
            this.StorageAccountSuffix = storageSuffix;

            this.DataLakeStoreAccountSuffix = bigAnalyticsManagementHelper.TryCreateDataLakeAccount(this.ResourceGroupName, this.DataLakeStoreAccountName, this.Location);
            this.SecondDataLakeStoreAccountSuffix = bigAnalyticsManagementHelper.TryCreateDataLakeAccount(this.ResourceGroupName, this.SecondDataLakeStoreAccountName, this.Location);
        }
Beispiel #3
0
        public CommonTestFixture()
        {
            var bigAnalyticsManagementHelper = new DataLakeAnalyticsManagementHelper(this);

            bigAnalyticsManagementHelper.TryRegisterSubscriptionForResource();
            bigAnalyticsManagementHelper.TryRegisterSubscriptionForResource("Microsoft.Storage");
            bigAnalyticsManagementHelper.TryRegisterSubscriptionForResource("Microsoft.DataLake");
            ResourceGroupName              = TestUtilities.GenerateName("rgaba1");
            DataLakeAnalyticsAccountName   = TestUtilities.GenerateName("testaba1");
            SecondDataLakeStoreAccountName = TestUtilities.GenerateName("teststorage1");
            DataLakeStoreAccountName       = TestUtilities.GenerateName("testdatalake1");
            SecondDataLakeStoreAccountName = TestUtilities.GenerateName("testdatalake2");
            StorageAccountName             = TestUtilities.GenerateName("testazureblob1");
            bigAnalyticsManagementHelper.TryCreateResourceGroup(ResourceGroupName, Location);

            string storageSuffix;

            this.StorageAccountAccessKey = bigAnalyticsManagementHelper.TryCreateStorageAccount(this.ResourceGroupName, this.StorageAccountName, "DataLakeAnalyticsTestStorage", "DataLakeAnalyticsTestStorageDescription", this.Location, out storageSuffix);
            this.StorageAccountSuffix    = storageSuffix;

            this.DataLakeStoreAccountSuffix       = bigAnalyticsManagementHelper.TryCreateDataLakeAccount(this.ResourceGroupName, this.DataLakeStoreAccountName, this.Location);
            this.SecondDataLakeStoreAccountSuffix = bigAnalyticsManagementHelper.TryCreateDataLakeAccount(this.ResourceGroupName, this.SecondDataLakeStoreAccountName, this.Location);
        }