diff options
Diffstat (limited to 'controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application')
9 files changed, 27 insertions, 25 deletions
diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiTest.java b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiTest.java index a1c9aa872fd..5deedaa2fb1 100644 --- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiTest.java +++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiTest.java @@ -661,17 +661,19 @@ public class ApplicationApiTest extends ControllerContainerTest { .data(streamer), "{\"message\":\"Application package version: 1.0.3-commit1, source revision of repository 'repository1', branch 'master' with commit 'commit1', by a@b, built against 6.1 at 1970-01-01T00:00:01Z\"}"); - // Sixth attempt has a multi-instance deployment spec, and fails. + // Sixth attempt has a multi-instance deployment spec, and is accepted. ApplicationPackage multiInstanceSpec = new ApplicationPackageBuilder() .instances("instance1,instance2") .environment(Environment.prod) .region("us-central-1") .parallel("us-west-1", "us-east-3") + .endpoint("default", "foo", "us-central-1", "us-west-1", "us-east-3") .build(); tester.assertResponse(request("/application/v4/tenant/tenant1/application/application1/instance/instance1/submit", POST) .screwdriverIdentity(SCREWDRIVER_ID) .data(createApplicationSubmissionData(multiInstanceSpec, 123)), - "{\"error-code\":\"BAD_REQUEST\",\"message\":\"Only single-instance deployment specs are currently supported\"}", 400); + "{\"message\":\"Application package version: 1.0.4-commit1, source revision of repository 'repository1', branch 'master' with commit 'commit1', by a@b, built against 6.1 at 1970-01-01T00:00:01Z\"}"); + // GET deployment job overview, after triggering system and staging test jobs. assertEquals(2, tester.controller().applications().deploymentTrigger().triggerReadyJobs()); @@ -730,6 +732,10 @@ public class ApplicationApiTest extends ControllerContainerTest { .userIdentity(USER_ID) .oktaAccessToken(OKTA_AT).oktaIdentityToken(OKTA_IT), "{\"message\":\"Deleted instance tenant1.application1.instance1\"}"); + tester.assertResponse(request("/application/v4/tenant/tenant1/application/application1/instance/instance2", DELETE) + .userIdentity(USER_ID) + .oktaAccessToken(OKTA_AT).oktaIdentityToken(OKTA_IT), + "{\"message\":\"Deleted instance tenant1.application1.instance2\"}"); // DELETE a tenant tester.assertResponse(request("/application/v4/tenant/tenant1", DELETE).userIdentity(USER_ID) diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/application2-with-patches.json b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/application2-with-patches.json index 267c8b01330..195219c691e 100644 --- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/application2-with-patches.json +++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/application2-with-patches.json @@ -31,8 +31,6 @@ "instances": [ { "instance": "default", - "deploymentJobs": [], - "changeBlockers": [], "globalRotations": [], "deployments": [] }, @@ -80,7 +78,7 @@ ], "changeBlockers": [], "globalRotations": [ - "https://application2--tenant2.global.vespa.oath.cloud:4443/" + "https://instance1--application2--tenant2.global.vespa.oath.cloud:4443/" ], "rotationId": "rotation-id-2", "deployments": [] diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/application2.json b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/application2.json index 8a1ed245fae..c29944924dc 100644 --- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/application2.json +++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/application2.json @@ -30,8 +30,6 @@ "instances": [ { "instance": "default", - "deploymentJobs": [], - "changeBlockers": [], "globalRotations": [], "deployments": [] }, @@ -79,7 +77,7 @@ ], "changeBlockers": [], "globalRotations": [ - "https://application2--tenant2.global.vespa.oath.cloud:4443/" + "https://instance1--application2--tenant2.global.vespa.oath.cloud:4443/" ], "rotationId": "rotation-id-2", "deployments": [] diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/instance-with-routing-policy.json b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/instance-with-routing-policy.json index d0abe24fa58..bb81125e54d 100644 --- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/instance-with-routing-policy.json +++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/instance-with-routing-policy.json @@ -162,7 +162,7 @@ "changeBlockers": [], "compileVersion": "(ignore)", "globalRotations": [ - "https://c0.application1.tenant1.global.vespa.oath.cloud/" + "https://c0.instance1.application1.tenant1.global.vespa.oath.cloud/" ], "instances": [ { diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/instance-without-change-multiple-deployments.json b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/instance-without-change-multiple-deployments.json index c61932f15fe..75493a30155 100644 --- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/instance-without-change-multiple-deployments.json +++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/instance-without-change-multiple-deployments.json @@ -211,7 +211,7 @@ "changeBlockers": [], "compileVersion": "(ignore)", "globalRotations": [ - "https://application1--tenant1.global.vespa.oath.cloud:4443/" + "https://instance1--application1--tenant1.global.vespa.oath.cloud:4443/" ], "rotationId": "rotation-id-1", "instances": [ diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/instance.json b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/instance.json index b2ab9aa636d..061931336ed 100644 --- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/instance.json +++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/instance.json @@ -216,7 +216,7 @@ ], "compileVersion": "6.0.0", "globalRotations": [ - "https://application1--tenant1.global.vespa.oath.cloud:4443/" + "https://instance1--application1--tenant1.global.vespa.oath.cloud:4443/" ], "rotationId": "rotation-id-1", "instances": [ diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/instance1-recursive.json b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/instance1-recursive.json index da73c36b208..2dacacedf51 100644 --- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/instance1-recursive.json +++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/instance1-recursive.json @@ -216,7 +216,7 @@ ], "compileVersion": "(ignore)", "globalRotations": [ - "https://application1--tenant1.global.vespa.oath.cloud:4443/" + "https://instance1--application1--tenant1.global.vespa.oath.cloud:4443/" ], "rotationId": "rotation-id-1", "instances": [ diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/jobs.json b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/jobs.json index 8fe38db994d..b73c36c804b 100644 --- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/jobs.json +++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/jobs.json @@ -3,12 +3,12 @@ "platform": { "platform": "6.1", "at": "(ignore)", - "pending": "Waiting for application change to 1.0.3-commit1 to complete" + "pending": "Waiting for application change to 1.0.4-commit1 to complete" }, "application": { "application": { - "hash": "1.0.3-commit1", - "build": 3, + "hash": "1.0.4-commit1", + "build": 4, "source": { "gitRepository": "repository1", "gitBranch": "master", @@ -21,8 +21,8 @@ }, "deploying": { "application": { - "hash": "1.0.3-commit1", - "build": 3, + "hash": "1.0.4-commit1", + "build": 4, "source": { "gitRepository": "repository1", "gitBranch": "master", @@ -43,8 +43,8 @@ "start": "(ignore)", "wantedPlatform": "6.1", "wantedApplication": { - "hash": "1.0.3-commit1", - "build": 3, + "hash": "1.0.4-commit1", + "build": 4, "source": { "gitRepository": "repository1", "gitBranch": "master", @@ -111,8 +111,8 @@ "start": "(ignore)", "wantedPlatform": "6.1", "wantedApplication": { - "hash": "1.0.3-commit1", - "build": 3, + "hash": "1.0.4-commit1", + "build": 4, "source": { "gitRepository": "repository1", "gitBranch": "master", @@ -181,8 +181,8 @@ "status": "pending", "wantedPlatform": "6.1", "wantedApplication": { - "hash": "1.0.3-commit1", - "build": 3, + "hash": "1.0.4-commit1", + "build": 4, "source": { "gitRepository": "repository1", "gitBranch": "master", diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/system-test-job.json b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/system-test-job.json index df55185fde5..a572fa04781 100644 --- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/system-test-job.json +++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/system-test-job.json @@ -39,8 +39,8 @@ "start": "(ignore)", "wantedPlatform": "6.1", "wantedApplication": { - "hash": "1.0.3-commit1", - "build": 3, + "hash": "1.0.4-commit1", + "build": 4, "source": { "gitRepository": "repository1", "gitBranch": "master", |