diff options
author | Jon Marius Venstad <venstad@gmail.com> | 2022-01-27 08:21:01 +0100 |
---|---|---|
committer | Jon Marius Venstad <venstad@gmail.com> | 2022-01-27 08:21:01 +0100 |
commit | 19ddf4d9f9decd60c6307ee8d51de036323e435e (patch) | |
tree | 1d90d4023356ccbbbe09e613fa3db613a1e4be35 /controller-server/src/test/java/com/yahoo/vespa/hosted/controller/maintenance/DeploymentIssueReporterTest.java | |
parent | c9ac4edeec6a905bedbfb6d605acb3dd7034262c (diff) |
No issues for apps with no production deployments
Diffstat (limited to 'controller-server/src/test/java/com/yahoo/vespa/hosted/controller/maintenance/DeploymentIssueReporterTest.java')
-rw-r--r-- | controller-server/src/test/java/com/yahoo/vespa/hosted/controller/maintenance/DeploymentIssueReporterTest.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/maintenance/DeploymentIssueReporterTest.java b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/maintenance/DeploymentIssueReporterTest.java index 0e365ffd135..7c4203d253c 100644 --- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/maintenance/DeploymentIssueReporterTest.java +++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/maintenance/DeploymentIssueReporterTest.java @@ -56,6 +56,22 @@ public class DeploymentIssueReporterTest { } @Test + public void nonProductionAppGetsNoIssues() { + tester.controllerTester().upgradeSystem(Version.fromString("6.2")); + var app = tester.newDeploymentContext("application", "tenant", "default"); + Contact contact = tester.controllerTester().serviceRegistry().contactRetrieverMock().contact(); + tester.controller().tenants().lockOrThrow(app.instanceId().tenant(), LockedTenant.Athenz.class, tenant -> + tester.controller().tenants().store(tenant.with(contact))); + + // app submits a package with no production deployments, and shall not receive issues. + app.submit(new ApplicationPackageBuilder().systemTest().stagingTest().build()).runJob(systemTest).failDeployment(stagingTest); + + // Advance to where deployment issues should be detected. + tester.clock().advance(maxFailureAge.plus(Duration.ofDays(1))); + assertFalse("No issues are produced for app.", issues.isOpenFor(app.application().id())); + } + + @Test public void testDeploymentFailureReporting() { tester.controllerTester().upgradeSystem(Version.fromString("6.2")); @@ -72,6 +88,7 @@ public class DeploymentIssueReporterTest { tester.controller().tenants().lockOrThrow(app3.instanceId().tenant(), LockedTenant.Athenz.class, tenant -> tester.controller().tenants().store(tenant.with(contact))); + // NOTE: All maintenance should be idempotent within a small enough time interval, so maintain is called twice in succession throughout. // app 1 fails staging tests. |