RemoveTestDatabasesWithCertAuth() public static méthode

Helper function to remove the test databases.
public static RemoveTestDatabasesWithCertAuth ( System powershell ) : void
powershell System
Résultat void
        private void DropTestDatabases()
        {
            // Remove the test databases
            NewAzureSqlDatabaseTests.RemoveTestDatabasesWithCertAuth(powershell);

            databasesAlreadyDropped = true;
        }
        public void CleanupTest()
        {
            powershell.Streams.ClearStreams();

            if (!databasesAlreadyDropped)
            {
                // Remove the test databases
                NewAzureSqlDatabaseTests.RemoveTestDatabasesWithCertAuth(powershell);
            }

            // Save the mock session results
            MockServerHelper.SaveDefaultSessionCollection();
        }
Exemple #3
0
 public void InitializeTest()
 {
     AzureSessionInitializer.InitializeAzureSession();
     ServiceManagementProfileProvider.InitializeServiceManagementProfile();
     powershell = System.Management.Automation.PowerShell.Create();
     MockHttpServer.SetupCertificates();
     UnitTestHelper.SetupUnitTestSubscription(powershell);
     serverName = SqlDatabaseTestSettings.Instance.ServerName;
     powershell.Runspace.SessionStateProxy.SetVariable("serverName", serverName);
     // Create atleast two test databases
     NewAzureSqlDatabaseTests.CreateTestDatabasesWithCertAuth(powershell);
     // Remove the test databases
     NewAzureSqlDatabaseTests.RemoveTestDatabasesWithCertAuth(powershell);
 }
Exemple #4
0
        public static void InitializeClass(TestContext context)
        {
            powershell = PowerShell.Create();

            MockHttpServer.SetupCertificates();

            UnitTestHelper.SetupUnitTestSubscription(powershell);

            serverName = SqlDatabaseTestSettings.Instance.ServerName;
            powershell.Runspace.SessionStateProxy.SetVariable("serverName", serverName);

            // Create atleast two test databases
            NewAzureSqlDatabaseTests.CreateTestDatabasesWithCertAuth(powershell);

            // Remove the test databases
            NewAzureSqlDatabaseTests.RemoveTestDatabasesWithCertAuth(powershell);
        }