HelmRollback extends HelmCommand<HelmRollback> implements CLI.WithTLS<HelmRollback> { public HelmRollback waitForK8s() { return withFlags(Argument.of("--wait")); } HelmRollback(String release, String revision);   HelmRollback(String helm, Arguments arguments, Arguments flags, EnvironmentVariables env); HelmRollback dryRun(); HelmRollback force(); HelmRollback noHooks(); HelmRollback recreatePods(); HelmRollback timeout(int seconds); HelmRollback waitForK8s(); HelmRollback waitForK8s(int seconds); @Override HelmRollback newInstance(String helm, Arguments arguments, Arguments flags, EnvironmentVariables env);  }
@Test public void shouldAddWaitOption() { HelmRollback command = Helm.rollback("foo-release", "1.0"); HelmRollback copy = command.waitForK8s(); assertThat(copy, is(not(sameInstance(command)))); assertCommand(copy, "rollback", "--wait", "foo-release", "1.0"); }
@Test public void shouldAddWaitWithTimeoutOption() { HelmRollback command = Helm.rollback("foo-release", "1.0"); HelmRollback copy = command.waitForK8s(19); assertThat(copy, is(not(sameInstance(command)))); assertCommand(copy, "rollback", "--wait", "--timeout", "19", "foo-release", "1.0"); }