diff options
4 files changed, 12 insertions, 26 deletions
diff --git a/configserver/src/test/java/com/yahoo/vespa/config/server/ApplicationRepositoryTest.java b/configserver/src/test/java/com/yahoo/vespa/config/server/ApplicationRepositoryTest.java index 8d659e02a52..1db8b9a2741 100644 --- a/configserver/src/test/java/com/yahoo/vespa/config/server/ApplicationRepositoryTest.java +++ b/configserver/src/test/java/com/yahoo/vespa/config/server/ApplicationRepositoryTest.java @@ -416,7 +416,7 @@ public class ApplicationRepositoryTest { .fileReferencesDir(temporaryFolder.newFolder("filedistribution").getAbsolutePath()) .sessionLifetime(60)); DeployTester tester = new DeployTester.Builder().configserverConfig(configserverConfig).clock(clock).build(); - tester.deployApp("src/test/apps/app", clock.instant()); // session 2 (numbering starts at 2) + tester.deployApp("src/test/apps/app"); // session 2 (numbering starts at 2) clock.advance(Duration.ofSeconds(10)); Optional<Deployment> deployment2 = tester.redeployFromLocalActive(); diff --git a/configserver/src/test/java/com/yahoo/vespa/config/server/ConfigServerBootstrapTest.java b/configserver/src/test/java/com/yahoo/vespa/config/server/ConfigServerBootstrapTest.java index 0df80c4d5c0..71e5adc6fea 100644 --- a/configserver/src/test/java/com/yahoo/vespa/config/server/ConfigServerBootstrapTest.java +++ b/configserver/src/test/java/com/yahoo/vespa/config/server/ConfigServerBootstrapTest.java @@ -161,7 +161,7 @@ public class ConfigServerBootstrapTest { .zone(new Zone(Environment.dev, RegionName.defaultName())) .curator(curator) .build(); - tester.deployApp("src/test/apps/app/", vespaVersion, Instant.now()); + tester.deployApp("src/test/apps/app/", vespaVersion); ApplicationId applicationId = tester.applicationId(); VersionState versionState = createVersionState(); diff --git a/configserver/src/test/java/com/yahoo/vespa/config/server/deploy/DeployTester.java b/configserver/src/test/java/com/yahoo/vespa/config/server/deploy/DeployTester.java index cca26cbb4f1..85ef4ffbbcc 100644 --- a/configserver/src/test/java/com/yahoo/vespa/config/server/deploy/DeployTester.java +++ b/configserver/src/test/java/com/yahoo/vespa/config/server/deploy/DeployTester.java @@ -124,35 +124,21 @@ public class DeployTester { /** * Do the initial "deploy" with the existing API-less code as the deploy API doesn't support first deploys yet. */ - public PrepareResult deployApp(String applicationPath) { - return deployApp(applicationPath, null, Instant.now()); + public void deployApp(String applicationPath) { + deployApp(applicationPath, (String) null); } /** * Do the initial "deploy" with the existing API-less code as the deploy API doesn't support first deploys yet. */ - public PrepareResult deployApp(String applicationPath, Instant now) { - return deployApp(applicationPath, null, now); + public PrepareResult deployApp(String applicationPath, String vespaVersion) { + return deployApp(applicationPath, new PrepareParams.Builder().vespaVersion(vespaVersion)); } /** * Do the initial "deploy" with the existing API-less code as the deploy API doesn't support first deploys yet. */ - public PrepareResult deployApp(String applicationPath, String vespaVersion) { - return deployApp(applicationPath, vespaVersion, Instant.now()); - } - - /** - * Do the initial "deploy" with the existing API-less code as the deploy API doesn't support first deploys yet. - */ - public PrepareResult deployApp(String applicationPath, String vespaVersion, Instant now) { - return deployApp(applicationPath, now, new PrepareParams.Builder().vespaVersion(vespaVersion)); - } - - /** - * Do the initial "deploy" with the existing API-less code as the deploy API doesn't support first deploys yet. - */ - public PrepareResult deployApp(String applicationPath, Instant now, PrepareParams.Builder paramsBuilder) { + public PrepareResult deployApp(String applicationPath, PrepareParams.Builder paramsBuilder) { paramsBuilder.applicationId(applicationId) .timeoutBudget(new TimeoutBudget(clock, Duration.ofSeconds(60))); diff --git a/configserver/src/test/java/com/yahoo/vespa/config/server/deploy/HostedDeployTest.java b/configserver/src/test/java/com/yahoo/vespa/config/server/deploy/HostedDeployTest.java index 7f0a49e6d32..01b2af7d219 100644 --- a/configserver/src/test/java/com/yahoo/vespa/config/server/deploy/HostedDeployTest.java +++ b/configserver/src/test/java/com/yahoo/vespa/config/server/deploy/HostedDeployTest.java @@ -98,7 +98,7 @@ public class HostedDeployTest { .modelFactory(createHostedModelFactory(Version.fromString("4.5.6"), Clock.systemUTC())) .configserverConfig(createConfigserverConfig()).build(); String dockerImageRepository = "docker.foo.com:4443/bar/baz"; - tester.deployApp("src/test/apps/hosted/", Instant.now(), new PrepareParams.Builder() + tester.deployApp("src/test/apps/hosted/", new PrepareParams.Builder() .vespaVersion("4.5.6") .dockerImageRepository(dockerImageRepository) .athenzDomain("myDomain")); @@ -117,7 +117,7 @@ public class HostedDeployTest { DeployTester tester = new DeployTester.Builder() .modelFactory(createHostedModelFactory(Version.fromString("4.5.6"), Clock.systemUTC())) .configserverConfig(createConfigserverConfig()).build(); - tester.deployApp("src/test/apps/hosted/", Instant.now(), new PrepareParams.Builder() + tester.deployApp("src/test/apps/hosted/", new PrepareParams.Builder() .tenantSecretStores(tenantSecretStores)); Optional<com.yahoo.config.provision.Deployment> deployment = tester.redeployFromLocalActive(tester.applicationId()); @@ -332,7 +332,7 @@ public class HostedDeployTest { // Deploy with version that does not exist on hosts and with app package that has no write access control, // validation of access control should not be done, since the app is already deployed in prod - tester.deployApp("src/test/apps/hosted-no-write-access-control", "6.1.0", Instant.now()); + tester.deployApp("src/test/apps/hosted-no-write-access-control", "6.1.0"); assertEquals(7, tester.getAllocatedHostsOf(applicationId).getHosts().size()); } @@ -343,7 +343,7 @@ public class HostedDeployTest { List<ModelFactory> modelFactories = List.of(createHostedModelFactory(clock), createFailingModelFactory(Version.fromString("1.0.0"))); // older than default DeployTester tester = new DeployTester.Builder().modelFactories(modelFactories).configserverConfig(createConfigserverConfig()).build(); - tester.deployApp("src/test/apps/validationOverride/", clock.instant()); + tester.deployApp("src/test/apps/validationOverride/"); // Redeployment from local active works { @@ -364,7 +364,7 @@ public class HostedDeployTest { // However, redeployment from the outside fails after this date { try { - tester.deployApp("src/test/apps/validationOverride/", "myApp", Instant.now()); + tester.deployApp("src/test/apps/validationOverride/", "myApp"); fail("Expected redeployment to fail"); } catch (Exception expected) { |