diff options
Diffstat (limited to 'controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/deployment/DeploymentApiTest.java')
-rw-r--r-- | controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/deployment/DeploymentApiTest.java | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/deployment/DeploymentApiTest.java b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/deployment/DeploymentApiTest.java index 61aab87532f..ca0db13b3d1 100644 --- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/deployment/DeploymentApiTest.java +++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/deployment/DeploymentApiTest.java @@ -33,7 +33,7 @@ public class DeploymentApiTest extends ControllerContainerTest { public void testDeploymentApi() { ContainerTester tester = new ContainerTester(container, responseFiles); DeploymentTester deploymentTester = new DeploymentTester(new ControllerTester(tester)); - Version version = Version.fromString("5.0"); + Version version = Version.fromString("4.9"); deploymentTester.controllerTester().upgradeSystem(version); ApplicationPackage multiInstancePackage = new ApplicationPackageBuilder() .instances("i1,i2") @@ -42,14 +42,24 @@ public class DeploymentApiTest extends ControllerContainerTest { ApplicationPackage applicationPackage = new ApplicationPackageBuilder() .region("us-west-1") .build(); - ApplicationPackage emptyPackage = new ApplicationPackageBuilder().instances("custom").build(); + ApplicationPackage emptyPackage = new ApplicationPackageBuilder().instances("default") + .allow(ValidationId.deploymentRemoval) + .build(); - // 3 applications deploy on current system version, 1 is empty + // Deploy application without any declared jobs on the oldest version. + var oldAppWithoutDeployment = deploymentTester.newDeploymentContext("tenant4", "application4", "default"); + oldAppWithoutDeployment.submit().failDeployment(JobType.systemTest); + oldAppWithoutDeployment.submit(emptyPackage); + + // System upgrades to 5.0 for the other applications. + version = Version.fromString("5.0"); + deploymentTester.controllerTester().upgradeSystem(version); + + // 3 applications deploy on current system version. var failingApp = deploymentTester.newDeploymentContext("tenant1", "application1", "default"); var productionApp = deploymentTester.newDeploymentContext("tenant2", "application2", "i1"); var otherProductionApp = deploymentTester.newDeploymentContext("tenant2", "application2", "i2"); var appWithoutDeployments = deploymentTester.newDeploymentContext("tenant3", "application3", "default"); - var otherAppWithoutDeployment = deploymentTester.newDeploymentContext("tenant4", "application4", "custom"); failingApp.submit(applicationPackage).deploy(); productionApp.submit(multiInstancePackage).runJob(JobType.systemTest).runJob(JobType.stagingTest).runJob(JobType.productionUsWest1); otherProductionApp.runJob(JobType.productionUsWest1); @@ -58,9 +68,6 @@ public class DeploymentApiTest extends ControllerContainerTest { appWithoutDeployments.submit(applicationPackage).deploy(); appWithoutDeployments.submit(new ApplicationPackageBuilder().allow(ValidationId.deploymentRemoval).build()); - // Deploy application without any declared jobs. - otherAppWithoutDeployment.submit(emptyPackage); - // New version released version = Version.fromString("5.1"); deploymentTester.controllerTester().upgradeSystem(version); |