diff options
author | jonmv <venstad@gmail.com> | 2023-06-15 14:08:33 +0200 |
---|---|---|
committer | jonmv <venstad@gmail.com> | 2023-06-15 14:08:33 +0200 |
commit | 3f6706b3410631620bce20d9695790dc33a9ddc0 (patch) | |
tree | 18ee6d6c5d80e8835239221743dcedbe5ea892f7 /controller-server/src/test/java | |
parent | b7fa88adf8cacacba2088d8532d79958182b1916 (diff) |
Add cloud account details in /deployment/v1 as well
Diffstat (limited to 'controller-server/src/test/java')
3 files changed, 23 insertions, 10 deletions
diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/overview-enclave.json b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/overview-enclave.json index 6a322f9f381..3673c1bdf07 100644 --- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/overview-enclave.json +++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/overview-enclave.json @@ -221,9 +221,6 @@ "url": "https://some.url:43/instance/default/job/production-aws-us-east-1c", "environment": "prod", "region": "prod.aws-us-east-1c", - "enclave": { - "cloudAccount": "aws:123456789012" - }, "currentPlatform": "6.1.0", "currentApplication": { "build": 1, @@ -232,6 +229,9 @@ "commit": "commit1" }, "toRun": [ ], + "enclave": { + "cloudAccount": "aws:123456789012" + }, "runs": [ { "id": 1, diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/deployment/DeploymentApiTest.java b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/deployment/DeploymentApiTest.java index bcc1f27c89f..eea5c9bdccf 100644 --- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/deployment/DeploymentApiTest.java +++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/deployment/DeploymentApiTest.java @@ -3,8 +3,11 @@ package com.yahoo.vespa.hosted.controller.restapi.deployment; import com.yahoo.component.Version; import com.yahoo.config.application.api.ValidationId; +import com.yahoo.config.provision.CloudAccount; import com.yahoo.config.provision.HostName; +import com.yahoo.config.provision.SystemName; import com.yahoo.config.provision.zone.ZoneId; +import com.yahoo.vespa.flags.PermanentFlags; import com.yahoo.vespa.hosted.controller.ControllerTester; import com.yahoo.vespa.hosted.controller.application.pkg.ApplicationPackage; import com.yahoo.vespa.hosted.controller.deployment.ApplicationPackageBuilder; @@ -34,6 +37,10 @@ public class DeploymentApiTest extends ControllerContainerTest { void testDeploymentApi() { ContainerTester tester = new ContainerTester(container, responseFiles); DeploymentTester deploymentTester = new DeploymentTester(new ControllerTester(tester)); + + CloudAccount cloudAccount = CloudAccount.from("aws:123456789012"); + deploymentTester.controllerTester().flagSource().withListFlag(PermanentFlags.CLOUD_ACCOUNTS.id(), List.of(cloudAccount.value()), String.class); + deploymentTester.controllerTester().zoneRegistry().configureCloudAccount(cloudAccount, ZoneId.from("prod.aws-us-east-1a")); Version version = Version.fromString("4.9"); deploymentTester.controllerTester().upgradeSystem(version); ApplicationPackage multiInstancePackage = new ApplicationPackageBuilder() @@ -41,7 +48,7 @@ public class DeploymentApiTest extends ControllerContainerTest { .region("us-west-1") .build(); ApplicationPackage applicationPackage = new ApplicationPackageBuilder() - .region("us-west-1") + .region("aws-us-east-1a", cloudAccount.value()) .build(); ApplicationPackage emptyPackage = new ApplicationPackageBuilder().instances("default") .allow(ValidationId.deploymentRemoval) diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/deployment/responses/root.json b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/deployment/responses/root.json index ac43fbf2a80..978258a31a6 100644 --- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/deployment/responses/root.json +++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/deployment/responses/root.json @@ -50,26 +50,32 @@ "coolingDownUntil": 1600022201500 }, { - "name": "production-us-west-1" + "name": "production-aws-us-east-1a" } ], "allRuns": { - "production-us-west-1": { + "production-aws-us-east-1a": { "success": { "number": 1, "start": 1600000000000, "end": 1600000000000, - "status": "success" + "status": "success", + "enclave": { + "cloudAccount": "aws:123456789012" + } } } }, "upgradeRuns": { - "production-us-west-1": { + "production-aws-us-east-1a": { "success": { "number": 1, "start": 1600000000000, "end": 1600000000000, - "status": "success" + "status": "success", + "enclave": { + "cloudAccount": "aws:123456789012" + } } } } @@ -198,7 +204,7 @@ "pending": "platform" }, { - "name": "production-us-west-1", + "name": "production-aws-us-east-1a", "pending": "platform" } ], |