diff options
author | Jon Marius Venstad <jvenstad@yahoo-inc.com> | 2018-09-27 09:15:02 +0200 |
---|---|---|
committer | Jon Marius Venstad <jvenstad@yahoo-inc.com> | 2018-09-27 09:15:02 +0200 |
commit | d7f0f545475c6d4463ddcefcde896a700d48c915 (patch) | |
tree | 22fae1efc90c72b0342d051ea92bd22a3096e742 /controller-server | |
parent | 3963d4ea24b607471f2d3fd37f136e2b6642080e (diff) |
Unit test illegal deployment spec
Diffstat (limited to 'controller-server')
-rw-r--r-- | controller-server/src/test/java/com/yahoo/vespa/hosted/controller/ControllerTest.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/ControllerTest.java b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/ControllerTest.java index 635e0c1fb26..a9353af1b20 100644 --- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/ControllerTest.java +++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/ControllerTest.java @@ -147,6 +147,19 @@ public class ControllerTest { assertEquals(5, applications.get(app1.id()).get().deploymentJobs().jobStatus().size()); + // Production zone for which there is no JobType is not allowed. + applicationPackage = new ApplicationPackageBuilder() + .environment(Environment.prod) + .region("deep-space-9") + .build(); + try { + tester.controller().jobController().submit(app1.id(), BuildJob.defaultSourceRevision, applicationPackage.zippedContent(), new byte[0]); + fail("Expected exception due to illegal deployment spec."); + } + catch (IllegalArgumentException e) { + assertEquals("No job is known for zone prod.deep-space-9 in default.", e.getMessage()); + } + // prod zone removal is not allowed applicationPackage = new ApplicationPackageBuilder() .environment(Environment.prod) |