Split unit test
@@ -465,16 +465,10 @@ public class DeploymentTriggerTest {
}
@Test
- public void settingANoOpChangeIsANoOp() {
+ public void downgradingApplicationVersionWorks() {
var app = tester.newDeploymentContext().submit().deploy();
ApplicationVersion appVersion0 = app.lastSubmission().get();
app.submit().deploy();
- ApplicationVersion appVersion1 = app.lastSubmission().get();
-
- // Triggering a roll-out of an already deployed application is a no-op.
- assertEquals(Change.empty(), app.instance().change());
- tester.deploymentTrigger().forceChange(app.instanceId(), Change.of(appVersion1));
- assertEquals(Change.empty(), app.instance().change());
// Downgrading application version.
tester.deploymentTrigger().forceChange(app.instanceId(), Change.of(appVersion0));
@@ -487,6 +481,19 @@ public class DeploymentTriggerTest {
assertEquals(appVersion0, app.instance().deployments().get(productionUsEast3.zone(tester.controller().system())).applicationVersion());
}
+ @Test
+ public void settingANoOpChangeIsANoOp() {
+ var app = tester.newDeploymentContext().submit().deploy();
+ ApplicationVersion appVersion0 = app.lastSubmission().get();
+ app.submit().deploy();
+ ApplicationVersion appVersion1 = app.lastSubmission().get();
+
+ // Triggering a roll-out of an already deployed application is a no-op.
+ assertEquals(Change.empty(), app.instance().change());
+ tester.deploymentTrigger().forceChange(app.instanceId(), Change.of(appVersion1));
+ assertEquals(Change.empty(), app.instance().change());
+ }
+
@Test
public void stepIsCompletePreciselyWhenItShouldBe() {
var app1 = tester.newDeploymentContext("tenant1", "app1", "default");
