diff options
author | jonmv <venstad@gmail.com> | 2022-04-19 12:21:55 +0200 |
---|---|---|
committer | jonmv <venstad@gmail.com> | 2022-04-22 13:01:59 +0200 |
commit | 4b6dc99190764e00976599911b860124dcead542 (patch) | |
tree | ff32dcdd4a40bf5b08d3d6b2506d57e2eb3cb8d4 /controller-api/src/test | |
parent | 5e77ba78f83c8f9132f604614b5d7b1714f867a7 (diff) |
JobType now always has a zone, which simplifies things
Diffstat (limited to 'controller-api/src/test')
-rw-r--r-- | controller-api/src/test/java/com/yahoo/vespa/hosted/controller/api/integration/deployment/JobTypeTest.java | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/controller-api/src/test/java/com/yahoo/vespa/hosted/controller/api/integration/deployment/JobTypeTest.java b/controller-api/src/test/java/com/yahoo/vespa/hosted/controller/api/integration/deployment/JobTypeTest.java index 64f4d6150dd..6ff52bd5f03 100644 --- a/controller-api/src/test/java/com/yahoo/vespa/hosted/controller/api/integration/deployment/JobTypeTest.java +++ b/controller-api/src/test/java/com/yahoo/vespa/hosted/controller/api/integration/deployment/JobTypeTest.java @@ -1,10 +1,7 @@ // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespa.hosted.controller.api.integration.deployment; -import com.yahoo.config.provision.Environment; -import com.yahoo.config.provision.SystemName; import com.yahoo.config.provision.zone.ZoneId; -import com.yahoo.vespa.hosted.controller.api.integration.zone.ZoneRegistry; import org.junit.Test; import static org.junit.Assert.assertEquals; @@ -18,20 +15,8 @@ public class JobTypeTest { @Test public void test() { - for (JobType type : JobType.values()) { - if (type.isProduction()) { - boolean match = false; - for (JobType other : JobType.values()) - match |= type != other - && type.isTest() == other.isDeployment() - && type.zones.equals(other.zones); - - assertTrue(type + " should have matching job", match); - } - } - - assertEquals(JobType.testUsEast3, JobType.ofSerialized("prod.us-east-3.test")); - assertEquals(JobType.devAwsUsEast1c, JobType.ofSerialized("dev.aws-us-east-1c")); + assertEquals(JobType.test("us-east-3"), JobType.ofSerialized("prod.us-east-3.test")); + assertEquals(JobType.dev("aws-us-east-1c"), JobType.ofSerialized("dev.aws-us-east-1c")); assertEquals(JobType.fromJobName("production-my-zone", null), JobType.prod("my-zone")); assertEquals(JobType.fromJobName("test-my-zone", null), JobType.test("my-zone")); |