diff options
author | Jon Marius Venstad <jvenstad@yahoo-inc.com> | 2018-08-09 10:05:52 +0200 |
---|---|---|
committer | Jon Marius Venstad <jvenstad@yahoo-inc.com> | 2018-08-09 10:05:52 +0200 |
commit | 7e4c6503f9e78c55b1f1e187514795557bc55728 (patch) | |
tree | 7d60f7a08bb7aefadbbc9b170e88331ac9823a80 /controller-server | |
parent | 27686a53742cfbb542d6e853f32350993cd612a4 (diff) |
Remove obsolete test
Diffstat (limited to 'controller-server')
2 files changed, 0 insertions, 349 deletions
diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/ControllerTest.java b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/ControllerTest.java index 6e953dcdd57..7cc76f1f7af 100644 --- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/ControllerTest.java +++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/ControllerTest.java @@ -236,61 +236,6 @@ public class ControllerTest { } @Test - public void testCleanupOfStaleDeploymentData() throws IOException { - DeploymentTester tester = new DeploymentTester(); - tester.controllerTester().zoneRegistry().setSystemName(SystemName.cd); - tester.controllerTester().zoneRegistry().setZones(ZoneId.from("prod", "cd-us-central-1")); - - Supplier<Map<JobType, JobStatus>> statuses = () -> - tester.application(ApplicationId.from("vespa", "canary", "default")) - .deploymentJobs().jobStatus(); - - // Current system version, matches version in test data - Version version = Version.fromString("6.141.117"); - tester.upgradeSystem(version); - assertEquals(version, tester.controller().versionStatus().systemVersion().get().versionNumber()); - - // Load test data data - byte[] json = Files.readAllBytes(Paths.get("src/test/java/com/yahoo/vespa/hosted/controller/maintenance/testdata/canary-with-stale-data.json")); - Application application = tester.controllerTester().createApplication(SlimeUtils.jsonToSlime(json)); - - ApplicationPackage applicationPackage = new ApplicationPackageBuilder() - .upgradePolicy("canary") - .region("cd-us-central-1") - .build(); - tester.jobCompletion(component).application(application).uploadArtifact(applicationPackage).submit(); - - long cdJobsCount = statuses.get().keySet().stream() - .filter(type -> type.zone(SystemName.cd).isPresent()) - .count(); - - long mainJobsCount = statuses.get().keySet().stream() - .filter(type -> type.zone(main).isPresent() && ! type.zone(SystemName.cd).isPresent()) - .count(); - - assertEquals("Irrelevant (main) data is present.", 8, mainJobsCount); - - // New version is released - version = Version.fromString("6.142.1"); - tester.upgradeSystem(version); - assertEquals(version, tester.controller().versionStatus().systemVersion().get().versionNumber()); - - // Test environment passes - tester.deployAndNotify(application, applicationPackage, true, systemTest); - - long newCdJobsCount = statuses.get().keySet().stream() - .filter(type -> type.zone(SystemName.cd).isPresent()) - .count(); - - long newMainJobsCount = statuses.get().keySet().stream() - .filter(type -> type.zone(main).isPresent() && ! type.zone(SystemName.cd).isPresent()) - .count(); - - assertEquals("Irrelevant (main) job data is removed.", 0, newMainJobsCount); - assertEquals("Relevant (cd) data is not removed.", cdJobsCount, newCdJobsCount); - } - - @Test public void testDnsAliasRegistration() { DeploymentTester tester = new DeploymentTester(); Application application = tester.createApplication("app1", "tenant1", 1, 1L); diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/maintenance/testdata/canary-with-stale-data.json b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/maintenance/testdata/canary-with-stale-data.json deleted file mode 100644 index 9864ce502f6..00000000000 --- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/maintenance/testdata/canary-with-stale-data.json +++ /dev/null @@ -1,294 +0,0 @@ -{ - "id": "vespa:canary:default", - "deploymentSpecField": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<deployment version=\"1.0\">\n <upgrade policy='canary'/>\n <test />\n <staging />\n <prod>\n <region active=\"true\">cd-us-central-1</region>\n </prod>\n</deployment>\n", - "validationOverrides": "<validation-overrides>\n <allow until=\"2017-04-27\">force-automatic-tenant-upgrade-test</allow>\n</validation-overrides>\n", - "deployments": [ - { - "zone": { - "environment": "prod", - "region": "cd-us-central-1" - }, - "version": "6.141.117", - "deployTime": 1503901783487, - "applicationPackageRevision": { - "applicationPackageHash": "72c3961314b96b1155a310f4785ae57ec74b1273", - "sourceRevision": { - "repositoryField": "git@git.test:vespa/canary-application.git", - "branchField": "origin/canary-cd", - "commitField": "566b7b30ee7886b845bb70958a0e1bdab2868633" - } - } - } - ], - "deploymentJobs": { - "projectId": 191186, - "jobStatus": [ - { - "jobType": "production-eu-west-1", - "lastTriggered": { - "version": "6.98.12", - "at": 1493034019032 - }, - "lastCompleted": { - "version": "6.98.12", - "at": 1493033995026 - }, - "lastSuccess": { - "version": "6.98.12", - "at": 1493033995026 - } - }, - { - "jobType": "production-cd-us-central-1", - "jobError": "unknown", - "lastTriggered": { - "version": "6.141.117", - "revision": { - "applicationPackageHash": "72c3961314b96b1155a310f4785ae57ec74b1273", - "sourceRevision": { - "repositoryField": "git@git.test:vespa/canary-application.git", - "branchField": "origin/canary-cd", - "commitField": "566b7b30ee7886b845bb70958a0e1bdab2868633" - } - }, - "at": 1503903384816 - }, - "lastCompleted": { - "version": "6.141.117", - "revision": { - "applicationPackageHash": "72c3961314b96b1155a310f4785ae57ec74b1273", - "sourceRevision": { - "repositoryField": "git@git.test:vespa/canary-application.git", - "branchField": "origin/canary-cd", - "commitField": "566b7b30ee7886b845bb70958a0e1bdab2868633" - } - }, - "at": 1503903659364 - }, - "firstFailing": { - "version": "6.141.117", - "revision": { - "applicationPackageHash": "72c3961314b96b1155a310f4785ae57ec74b1273", - "sourceRevision": { - "repositoryField": "git@git.test:vespa/canary-application.git", - "branchField": "origin/canary-cd", - "commitField": "566b7b30ee7886b845bb70958a0e1bdab2868633" - } - }, - "at": 1503903659364 - }, - "lastSuccess": { - "version": "6.141.117", - "revision": { - "applicationPackageHash": "72c3961314b96b1155a310f4785ae57ec74b1273", - "sourceRevision": { - "repositoryField": "git@git.test:vespa/canary-application.git", - "branchField": "origin/canary-cd", - "commitField": "566b7b30ee7886b845bb70958a0e1bdab2868633" - } - }, - "at": 1503903556127 - } - }, - { - "jobType": "component", - "lastTriggered": { - "version": "6.141.109", - "at": 1503867517105 - }, - "lastCompleted": { - "version": "6.141.109", - "at": 1503867704464 - }, - "lastSuccess": { - "version": "6.141.109", - "at": 1503867704464 - } - }, - { - "jobType": "production-corp-us-east-1", - "lastTriggered": { - "version": "6.98.12", - "at": 1493034428590 - }, - "lastCompleted": { - "version": "6.98.12", - "at": 1493034114538 - }, - "lastSuccess": { - "version": "6.98.12", - "at": 1493034114538 - } - }, - { - "jobType": "production-ap-southeast-1", - "lastTriggered": { - "version": "6.98.12", - "at": 1493034265146 - }, - "lastCompleted": { - "version": "6.98.12", - "at": 1493034097617 - }, - "lastSuccess": { - "version": "6.98.12", - "at": 1493034097617 - } - }, - { - "jobType": "production-us-central-1", - "lastTriggered": { - "version": "6.98.12", - "at": 1493033800484 - }, - "lastCompleted": { - "version": "6.98.12", - "at": 1493034273753 - }, - "lastSuccess": { - "version": "6.98.12", - "at": 1493034273753 - } - }, - { - "jobType": "staging-test", - "lastTriggered": { - "version": "6.141.117", - "revision": { - "applicationPackageHash": "72c3961314b96b1155a310f4785ae57ec74b1273", - "sourceRevision": { - "repositoryField": "git@git.test:vespa/canary-application.git", - "branchField": "origin/canary-cd", - "commitField": "566b7b30ee7886b845bb70958a0e1bdab2868633" - } - }, - "at": 1503900683154 - }, - "lastCompleted": { - "version": "6.141.117", - "revision": { - "applicationPackageHash": "72c3961314b96b1155a310f4785ae57ec74b1273", - "sourceRevision": { - "repositoryField": "git@git.test:vespa/canary-application.git", - "branchField": "origin/canary-cd", - "commitField": "566b7b30ee7886b845bb70958a0e1bdab2868633" - } - }, - "at": 1503901635745 - }, - "lastSuccess": { - "version": "6.141.117", - "revision": { - "applicationPackageHash": "72c3961314b96b1155a310f4785ae57ec74b1273", - "sourceRevision": { - "repositoryField": "git@git.test:vespa/canary-application.git", - "branchField": "origin/canary-cd", - "commitField": "566b7b30ee7886b845bb70958a0e1bdab2868633" - } - }, - "at": 1503901635745 - } - }, - { - "jobType": "system-test", - "lastTriggered": { - "version": "6.141.117", - "revision": { - "applicationPackageHash": "72c3961314b96b1155a310f4785ae57ec74b1273", - "sourceRevision": { - "repositoryField": "git@git.test:vespa/canary-application.git", - "branchField": "origin/canary-cd", - "commitField": "566b7b30ee7886b845bb70958a0e1bdab2868633" - } - }, - "at": 1503899621243 - }, - "lastCompleted": { - "version": "6.141.117", - "revision": { - "applicationPackageHash": "72c3961314b96b1155a310f4785ae57ec74b1273", - "sourceRevision": { - "repositoryField": "git@git.test:vespa/canary-application.git", - "branchField": "origin/canary-cd", - "commitField": "566b7b30ee7886b845bb70958a0e1bdab2868633" - } - }, - "at": 1503900025214 - }, - "lastSuccess": { - "version": "6.141.117", - "revision": { - "applicationPackageHash": "72c3961314b96b1155a310f4785ae57ec74b1273", - "sourceRevision": { - "repositoryField": "git@git.test:vespa/canary-application.git", - "branchField": "origin/canary-cd", - "commitField": "566b7b30ee7886b845bb70958a0e1bdab2868633" - } - }, - "at": 1503900025214 - } - }, - { - "jobType": "production-us-west-1", - "lastTriggered": { - "version": "6.98.12", - "at": 1493034273768 - }, - "lastCompleted": { - "version": "6.98.12", - "at": 1493034019015 - }, - "lastSuccess": { - "version": "6.98.12", - "at": 1493034019015 - } - }, - { - "jobType": "production-ap-northeast-1", - "lastTriggered": { - "version": "6.98.12", - "at": 1493033995045 - }, - "lastCompleted": { - "version": "6.98.12", - "at": 1493034257206 - }, - "lastSuccess": { - "version": "6.98.12", - "at": 1493034257206 - } - }, - { - "jobType": "production-ap-northeast-2", - "lastTriggered": { - "version": "6.98.12", - "at": 1493034257222 - }, - "lastCompleted": { - "version": "6.98.12", - "at": 1493034265048 - }, - "lastSuccess": { - "version": "6.98.12", - "at": 1493034265048 - } - }, - { - "jobType": "production-us-east-3", - "lastTriggered": { - "version": "6.98.12", - "at": 1493034114555 - }, - "lastCompleted": { - "version": "6.98.12", - "at": 1493033800469 - }, - "lastSuccess": { - "version": "6.98.12", - "at": 1493033800469 - } - } - ] - }, - "outstandingChangeField": false -} |