Esempio n. 1
0
        public async Task RunBeforeAnyTests()
        {
            var configuration = TestConfigurationFactory.Build();

            await using var dbContext = TestDatabase.CreateSheepItDbContext(configuration);

            dbContext.Database.EnsureDeleted();
            dbContext.Database.Migrate();
        }
Esempio n. 2
0
        private static CommandsOutput RunCommand(string[] commands, VariableForEnvironment[] variables)
        {
            var config = TestConfigurationFactory.Build();

            var processSettings = new DeploymentProcessSettings(config);

            var commandRunner = new BashCommandsRunner(
                workingDir: TestContext.CurrentContext.TestDirectory,
                bashPath: processSettings.Shell.Bash.ToString()
                );

            var processOutput = commandRunner.Run(commands, variables);

            PrintResults(processOutput);

            return(processOutput);
        }