public static int Main(string[] args) { var connectionString = ConnectionStringFactory.GetConnectionString(args); var isDryRun = args.Contains("dryRun"); var preDeployResult = PerformUpgrade(connectionString, EnvironmentFilter.GetPreDeployFilter(args), isDryRun); if (!preDeployResult.Successful) { return(ResultReporter.ReportResult(preDeployResult)); } ResultReporter.ReportResult(preDeployResult); var result = PerformUpgrade(connectionString, EnvironmentFilter.GetFilter(args), isDryRun); if (!result.Successful) { return(ResultReporter.ReportResult(result)); } ResultReporter.ReportResult(result); var postDeployResult = PerformUpgrade(connectionString, EnvironmentFilter.GetPostDeployFilter(args), isDryRun); return(ResultReporter.ReportResult(postDeployResult)); }
public void PostDeployment_Script_is_included_when_parameters_match(bool expectedToRun, string scriptFile, params string[] args) { // Arrange var filter = EnvironmentFilter.GetPostDeployFilter(args); // Act var actual = filter.Invoke(scriptFile); // Assert actual.Should().Be(expectedToRun); }