summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjonmv <venstad@gmail.com>2022-11-16 11:31:48 +0100
committerjonmv <venstad@gmail.com>2022-11-16 11:31:48 +0100
commit8c988214f3d35a50ffc750e236a742411ac92b97 (patch)
tree3aca6e6d369139e1f20da17be6944a6b2ccdec1f
parenta033e8e7f94747026a6c996f76f63e998ef9da82 (diff)
Add test for regional legacy dns names too
-rw-r--r--controller-server/src/test/java/com/yahoo/vespa/hosted/controller/application/EndpointTest.java35
1 files changed, 35 insertions, 0 deletions
diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/application/EndpointTest.java b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/application/EndpointTest.java
index 27684b79d4a..16d449fe89b 100644
--- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/application/EndpointTest.java
+++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/application/EndpointTest.java
@@ -277,6 +277,41 @@ public class EndpointTest {
}
@Test
+ void application_endpoints_legacy_dns_names() {
+ Map<String, Endpoint> tests = Map.of(
+ "weighted.a1.t1.us-west-1.r.vespa-app.cloud",
+ Endpoint.of(app1)
+ .targetApplication(EndpointId.of("weighted"), ClusterSpec.Id.from("qrs"),
+ Map.of(new DeploymentId(app1.instance("i1"), ZoneId.from("prod", "us-west-1")), 1))
+ .routingMethod(RoutingMethod.exclusive)
+ .on(Port.tls())
+ .in(SystemName.Public),
+ "weighted.a1.t1.us-west-1.r.cd.vespa-app.cloud",
+ Endpoint.of(app1)
+ .targetApplication(EndpointId.of("weighted"), ClusterSpec.Id.from("qrs"),
+ Map.of(new DeploymentId(app1.instance("i1"), ZoneId.from("prod", "us-west-1")), 1))
+ .routingMethod(RoutingMethod.exclusive)
+ .on(Port.tls())
+ .in(SystemName.PublicCd),
+ "a2.t2.us-east-3-r.vespa.oath.cloud",
+ Endpoint.of(app2)
+ .targetApplication(EndpointId.defaultId(), ClusterSpec.Id.from("qrs"),
+ Map.of(new DeploymentId(app2.instance("i1"), ZoneId.from("prod", "us-east-3")), 1))
+ .routingMethod(RoutingMethod.exclusive)
+ .on(Port.tls())
+ .in(SystemName.main),
+ "cd.a2.t2.us-east-3-r.vespa.oath.cloud",
+ Endpoint.of(app2)
+ .targetApplication(EndpointId.defaultId(), ClusterSpec.Id.from("qrs"),
+ Map.of(new DeploymentId(app2.instance("i1"), ZoneId.from("prod", "us-east-3")), 1))
+ .routingMethod(RoutingMethod.exclusive)
+ .on(Port.tls())
+ .in(SystemName.cd)
+ );
+ tests.forEach((expected, endpoint) -> assertEquals(expected, endpoint.legacyRegionalDsnName()));
+ }
+
+ @Test
void application_endpoints() {
Map<String, Endpoint> tests = Map.of(
"https://weighted.a1.t1.a.vespa-app.cloud/",