Beispiel #1
0
        public void TestBackup()
        {
            var environmentRepository = new EnvironmentRepository(connectionString);

            EnvironmentBackupper.Backup(environmentRepository);

            var backedUpEnvironment = environmentRepository.GetBackupEnvironments().FirstOrDefault();


            Assert.NotNull(backedUpEnvironment);
            Assert.Null(backedUpEnvironment.EnvironmentVariables.FirstOrDefault(v => v.Name == "_CHAMI_ENV"));

            // We remove the environment we just added to make sure we can execute this test again.
            environmentRepository.DeleteEnvironmentById(backedUpEnvironment.EnvironmentId);
        }
Beispiel #2
0
 /// <summary>
 /// Performs a backup of the current state of environment variables, excluding those that belong to a Chami environment.
 /// </summary>
 public void BackupEnvironment()
 {
     EnvironmentBackupper.Backup(_repository);
 }