@Override public Self deploy(Collection<ChangeInput> changes) { return this.deploy(changes, new MainDeployerArgs()); }
@Override public Self deploy() { return this.deploy(new MainDeployerArgs()); }
@Override public Self deploy(Collection<ChangeInput> changes) { return this.deploy(changes, new MainDeployerArgs()); }
@Override public Self deploy() { return this.deploy(new MainDeployerArgs()); }
appContext.deploy(new MainDeployerArgs().useBaseline(true));
appContext.deploy(new MainDeployerArgs().useBaseline(true));
.deploy(new MainDeployerArgs().onboardingMode(true)); } catch (RuntimeException exc) { exc.printStackTrace(); deployContext.deploy(new MainDeployerArgs().onboardingMode(true)); } catch (RuntimeException exc) { exc.printStackTrace(); deployContext.deploy(new MainDeployerArgs().onboardingMode(true)); } catch (RuntimeException exc) { exc.printStackTrace();
private void deploy(MongoDbEnvironment env) { MainDeployerArgs args = new MainDeployerArgs();
private void deploy(MongoDbEnvironment env) { MainDeployerArgs args = new MainDeployerArgs();
MainDeployerArgs dbArgs = new MainDeployerArgs() .noPrompt(this.noPrompt != null && this.noPrompt) .performInitOnly(performInitOnly)
"VIEW4 is dropped\n"); Obevo.readEnvironmentAndBuildContext("scenariotests/rollback-scenario/step1", "test") .deploy(new MainDeployerArgs().rollback(true));
MainDeployerArgs dbArgs = new MainDeployerArgs();
private MainDeployerArgs getMainDeployerArgs() { MainDeployerArgs args = new MainDeployerArgs(); if (this.tables != null || this.views != null) { MutableList<Predicate<? super ChangeKey>> predicates = Lists.mutable.empty(); if (this.tables != null) { predicates.add(ChangeKeyPredicateBuilder.newBuilder() .setChangeTypes(ChangeType.TABLE_STR, ChangeType.FOREIGN_KEY_STR, ChangeType.TRIGGER_INCREMENTAL_OLD_STR, ChangeType.STATICDATA_STR) .setObjectNames(Sets.immutable.withAll(this.tables)) .build()); } if (this.views != null) { predicates.add(ChangeKeyPredicateBuilder.newBuilder() .setChangeTypes(ChangeType.VIEW_STR) .setObjectNames(Sets.immutable.withAll(this.views)) .build()); } args.setChangeInclusionPredicate(Predicates.or(predicates)); } args.setAllChangesets(true); // for unit tests, we always want all changes to deploy return args; }
private MainDeployerArgs getMainDeployerArgs() { MainDeployerArgs args = new MainDeployerArgs(); if (this.tables != null || this.views != null) { MutableList<Predicate<? super ChangeKey>> predicates = Lists.mutable.empty(); if (this.tables != null) { predicates.add(ChangeKeyPredicateBuilder.newBuilder() .setChangeTypes(ChangeType.TABLE_STR, ChangeType.FOREIGN_KEY_STR, ChangeType.TRIGGER_INCREMENTAL_OLD_STR, ChangeType.STATICDATA_STR) .setObjectNames(Sets.immutable.withAll(this.tables)) .build()); } if (this.views != null) { predicates.add(ChangeKeyPredicateBuilder.newBuilder() .setChangeTypes(ChangeType.VIEW_STR) .setObjectNames(Sets.immutable.withAll(this.views)) .build()); } args.setChangeInclusionPredicate(Predicates.or(predicates)); } args.setAllChangesets(true); // for unit tests, we always want all changes to deploy return args; }
@Test public void testChangesetAppliedAtOnce() { DbDeployerAppContext dbDeployerAppContext = DbEnvironmentFactory.getInstance() .readOneFromSourcePath("scenariotests/changesetDeploy/step1") .buildAppContext() .setupEnvInfra().cleanEnvironment(); dbDeployerAppContext.deploy(new MainDeployerArgs().allChangesets(true)); checkForIndex(dbDeployerAppContext, "TABLE_A", "TABLE_A_IND1", true); checkForIndex(dbDeployerAppContext, "TABLE_B", "TABLE_B_IND1", true); checkForIndex(dbDeployerAppContext, "TABLE_C", "TABLE_C_IND1", true); }
@Test public void testChangesetsAppliedInPhases() { DbDeployerAppContext dbDeployerAppContext = DbEnvironmentFactory.getInstance() .readOneFromSourcePath("scenariotests/changesetDeploy/step1") .buildAppContext() .setupEnvInfra().cleanEnvironment(); dbDeployerAppContext.deploy(); // in the default phase, all the checkForIndex(dbDeployerAppContext, "TABLE_A", "TABLE_A_IND1", false); checkForIndex(dbDeployerAppContext, "TABLE_B", "TABLE_B_IND1", false); checkForIndex(dbDeployerAppContext, "TABLE_C", "TABLE_C_IND1", false); dbDeployerAppContext.deploy(new MainDeployerArgs().changesetNames(Sets.immutable.with("phaseA"))); checkForIndex(dbDeployerAppContext, "TABLE_A", "TABLE_A_IND1", true); checkForIndex(dbDeployerAppContext, "TABLE_B", "TABLE_B_IND1", true); checkForIndex(dbDeployerAppContext, "TABLE_C", "TABLE_C_IND1", false); dbDeployerAppContext.deploy(new MainDeployerArgs().changesetNames(Sets.immutable.with("phaseB"))); checkForIndex(dbDeployerAppContext, "TABLE_A", "TABLE_A_IND1", true); checkForIndex(dbDeployerAppContext, "TABLE_B", "TABLE_B_IND1", true); checkForIndex(dbDeployerAppContext, "TABLE_C", "TABLE_C_IND1", true); }
.setupEnvInfra() .cleanEnvironment() .deploy(new MainDeployerArgs().reason("try1").deployExecutionAttributes(Sets.immutable.with( new DeployExecutionAttributeImpl("A", "aval"), new DeployExecutionAttributeImpl("B", "bval") dbDeployerAppContext = getAppContext.valueOf(1); dbDeployerAppContext .deploy(new MainDeployerArgs().reason("try1a-noop").deployExecutionAttributes(Sets.immutable.with( new DeployExecutionAttributeImpl("A", "aval"), new DeployExecutionAttributeImpl("B", "bval"), dbDeployerAppContext .setupEnvInfra() .deploy(new MainDeployerArgs().reason("try2").deployExecutionAttributes(Sets.immutable.with( new DeployExecutionAttributeImpl("C", "cval2"), new DeployExecutionAttributeImpl("E", "eval") dbDeployerAppContext .setupEnvInfra() .deploy(new MainDeployerArgs().reason("try3").deployExecutionAttributes(Sets.immutable.with( new DeployExecutionAttributeImpl("F", "fval") )))
@Test public void testDeploy() { DbEnvironmentFactory.getInstance().readOneFromSourcePath("./src/test/resources/scenariotests/initusecase/step1") .buildAppContext("abc", "abc") .setupEnvInfra().cleanEnvironment() .deploy(); // TODO the SystemOutRule doesn't work w/ Maven, as no system output is captured // Leave this commented-code in; I REALLY would like to get this to work! // systemOutRule.enableLog(); DbEnvironmentFactory.getInstance().readOneFromSourcePath("./src/test/resources/scenariotests/initusecase/step2") .buildAppContext("abc", "abc") .deploy(new MainDeployerArgs().performInitOnly(true)); // init // validate that the warning message is getting printed out for doing an INIT when tables already exist // assertThat(systemOutRule.getLog(), containsString(DbDeployer.INIT_WARNING_MESSAGE)); DbEnvironmentFactory.getInstance().readOneFromSourcePath("./src/test/resources/scenariotests/initusecase/step2") .buildAppContext("abc", "abc") .deploy(); }
@Test public void testAseDeploy() throws Exception { MainDeployerArgs args1 = new MainDeployerArgs() .deployExecutionAttributes(Sets.immutable.<DeployExecutionAttribute>with( new DeployExecutionAttributeImpl("attr1", "v1_val1"), verifyExecution1(execution1); MainDeployerArgs args2 = new MainDeployerArgs() .deployExecutionAttributes(Sets.immutable.<DeployExecutionAttribute>with( new DeployExecutionAttributeImpl("attr1", "v2_val1"),
@Test public void testAseDeploy() throws Exception { MainDeployerArgs args1 = new MainDeployerArgs() .deployExecutionAttributes(Sets.immutable.<DeployExecutionAttribute>with( new DeployExecutionAttributeImpl("attr1", "v1_val1"), verifyExecution1(execution1); MainDeployerArgs args2 = new MainDeployerArgs() .deployExecutionAttributes(Sets.immutable.<DeployExecutionAttribute>with( new DeployExecutionAttributeImpl("attr1", "v2_val1"),