aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Marius Venstad <venstad@gmail.com>2020-03-10 10:18:30 +0100
committerJon Marius Venstad <venstad@gmail.com>2020-03-10 10:18:30 +0100
commit715e947dcc476c79bfa80e792c7110be4f23ce46 (patch)
tree3951b675a34227faba57c81e393d275fc5242d66
parentddd5141d112d44f881da17e83d26ac18ad35c3c1 (diff)
Put back "endpoints" in test config response
-rw-r--r--controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/TestConfigSerializer.java8
-rw-r--r--controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/test-config-dev.json8
-rw-r--r--controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/test-config.json5
-rw-r--r--controller-server/src/test/resources/testConfig.json5
4 files changed, 26 insertions, 0 deletions
diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/TestConfigSerializer.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/TestConfigSerializer.java
index c35d4f817bc..14e18b2c58a 100644
--- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/TestConfigSerializer.java
+++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/TestConfigSerializer.java
@@ -43,6 +43,14 @@ public class TestConfigSerializer {
root.setString("system", system.value());
root.setBool("isCI", isCI);
+ // TODO jvenstad: remove when clients can be updated
+ Cursor endpointsObject = root.setObject("endpoints");
+ deployments.forEach((zone, endpoints) -> {
+ Cursor endpointArray = endpointsObject.setArray(zone.value());
+ for (Endpoint endpoint : endpoints)
+ endpointArray.addString(endpoint.url().toString());
+ });
+
Cursor zoneEndpointsObject = root.setObject("zoneEndpoints");
deployments.forEach((zone, endpoints) -> {
Cursor clusterEndpointsObject = zoneEndpointsObject.setObject(zone.value());
diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/test-config-dev.json b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/test-config-dev.json
index 76454cf5d99..0632ab7a67b 100644
--- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/test-config-dev.json
+++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/test-config-dev.json
@@ -3,6 +3,14 @@
"zone": "dev.us-east-1",
"system": "main",
"isCI": false,
+ "endpoints": {
+ "dev.us-east-1": [
+ "https://my-user--application1--tenant1.us-east-1.dev.vespa.oath.cloud:4443/"
+ ],
+ "prod.us-central-1": [
+ "https://application1--tenant1.us-central-1.vespa.oath.cloud:4443/"
+ ]
+ },
"zoneEndpoints": {
"dev.us-east-1": {
"default": "https://my-user--application1--tenant1.us-east-1.dev.vespa.oath.cloud:4443/"
diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/test-config.json b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/test-config.json
index 542c7297bbd..c81ed767239 100644
--- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/test-config.json
+++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/test-config.json
@@ -3,6 +3,11 @@
"zone": "prod.us-central-1",
"system": "main",
"isCI": false,
+ "endpoints": {
+ "prod.us-central-1": [
+ "https://application1--tenant1.us-central-1.vespa.oath.cloud:4443/"
+ ]
+ },
"zoneEndpoints": {
"prod.us-central-1": {
"default": "https://application1--tenant1.us-central-1.vespa.oath.cloud:4443/"
diff --git a/controller-server/src/test/resources/testConfig.json b/controller-server/src/test/resources/testConfig.json
index 1c6290762d1..48bf4792176 100644
--- a/controller-server/src/test/resources/testConfig.json
+++ b/controller-server/src/test/resources/testConfig.json
@@ -3,6 +3,11 @@
"zone": "test.aws-us-east-1c",
"system": "publiccd",
"isCI": true,
+ "endpoints": {
+ "test.aws-us-east-1c": [
+ "https://ai--default--default.global.vespa.oath.cloud/"
+ ]
+ },
"zoneEndpoints": {
"test.aws-us-east-1c": {
"ai": "https://ai--default--default.global.vespa.oath.cloud/"