예제 #1
0
        public void EnvironmentRemovedFromW3SVCAndWASOnUninstall()
        {
            _tServer.CommandLineInstall(Settings.LicenseKey, testName: nameof(EnvironmentRemovedFromW3SVCAndWASOnUninstall));
            ComponentManager.TruncateComponents(_tServer);
            _tServer.CommandLineUninstall(testName: nameof(EnvironmentRemovedFromW3SVCAndWASOnUninstall));

            // Verify the values have been removed
            Assert.IsFalse(_tServer.RegistryKeyValueExists(RegistryHive.LocalMachine, @"SYSTEM\CurrentControlSet\Services\W3SVC", "Environment"));
            Assert.IsFalse(_tServer.RegistryKeyValueExists(RegistryHive.LocalMachine, @"SYSTEM\CurrentControlSet\Services\WAS", "Environment"));
            ComponentManager.CleanComponents(_tServer, testName: nameof(EnvironmentRemovedFromW3SVCAndWASOnUninstall));
        }
 public void TestFixtureSetUpBase()
 {
     Common.Log($"TestFixtureBaseAllOptions - Settings.IsDeveloperMode {Settings.IsDeveloperMode}");
     if (!Settings.IsDeveloperMode)
     {
         Console.WriteLine("-- Beginning execution of '{0}'.", this.GetType().Name);
         TServer = new TestServer();
         Common.TestServerContainer.Add(this.GetType().FullName, TServer);
         TServer.CommandLineUninstall(true, testName: nameof(TestFixtureSetUpBase));
         ComponentManager.CleanComponents(TServer, testName: nameof(TestFixtureSetUpBase));
         TServer.EventLog_Clear("Application");
         TServer.CommandLineInstall(licenseKey: Settings.LicenseKey, allFeatures: true, testName: nameof(TestFixtureSetUpBase));
         ComponentManager.TruncateComponents(TServer);
     }
 }
예제 #3
0
        public void UninstallDoesNotRemoveUserCreatedValues()
        {
            String[] expectedValues = new String[] { "EXISTING_DATA=1" };

            // Create name/value pairs in the W3SVC and WAS keys
            _tServer.CreateOrUpdateRegistryKey(RegistryHive.LocalMachine, @"SYSTEM\CurrentControlSet\Services\W3SVC", @"Environment", new string[] { "EXISTING_DATA=1" });
            _tServer.CreateOrUpdateRegistryKey(RegistryHive.LocalMachine, @"SYSTEM\CurrentControlSet\Services\WAS", @"Environment", new string[] { "EXISTING_DATA=1" });

            _tServer.CommandLineInstall(Settings.LicenseKey, testName: nameof(UninstallDoesNotRemoveUserCreatedValues));
            ComponentManager.TruncateComponents(_tServer);
            _tServer.CommandLineUninstall(testName: nameof(UninstallDoesNotRemoveUserCreatedValues));

            Assert.AreEqual(expectedValues, _tServer.GetRegistryKeyValue(RegistryHive.LocalMachine, @"SYSTEM\CurrentControlSet\Services\W3SVC", "Environment"));
            Assert.AreEqual(expectedValues, _tServer.GetRegistryKeyValue(RegistryHive.LocalMachine, @"SYSTEM\CurrentControlSet\Services\WAS", "Environment"));
            ComponentManager.CleanComponents(_tServer, testName: nameof(UninstallDoesNotRemoveUserCreatedValues));
        }
예제 #4
0
        public void EnvironmentVariablesRemovedOnUninstall_Core()
        {
            _tServer.CommandLineInstall(Settings.LicenseKey, new List <Enumerations.InstallFeatures>()
            {
                Enumerations.InstallFeatures.StartMenuShortcuts, Enumerations.InstallFeatures.NETCoreSupport, Enumerations.InstallFeatures.ASPNETTools
            }, testName: nameof(EnvironmentVariablesRemovedOnUninstall_Core));
            ComponentManager.TruncateComponents(_tServer);
            _tServer.CommandLineUninstall(testName: nameof(EnvironmentVariablesRemovedOnUninstall_Core));

            // Verify the CORECLR_PROFILER', 'CORECLR_PROFILER_PATH', and 'CORECLR_NEWRELIC_HOME' environment variables were removed
            Assert.IsFalse(_tServer.EnvironmentVariableExists("CORECLR_PROFILER"));
            Assert.IsFalse(_tServer.EnvironmentVariableExists("CORECLR_PROFILER_PATH"));
            Assert.IsFalse(_tServer.EnvironmentVariableExists("CORECLR_NEWRELIC_HOME"));
            Assert.IsFalse(_tServer.EnvironmentVariableExists("CORECLR_NEWRELIC_INSTALL_PATH"));
            ComponentManager.CleanComponents(_tServer, testName: nameof(EnvironmentVariablesRemovedOnUninstall_Core));
        }
예제 #5
0
 public void SetUp()
 {
     _tServer.IISCommand("Stop");
     _tServer.RunCleanUninstall(testName: nameof(SetUp));
     ComponentManager.CleanComponents(_tServer, testName: nameof(SetUp));
 }