From 138b462ab7b56ab2acf53959533a472ea187be76 Mon Sep 17 00:00:00 2001 From: Jon Bratseth Date: Wed, 11 Oct 2017 13:35:06 +0200 Subject: Enforce order of block-change Enforce that the block-change tag is placed after any test and staging tag and before the prod tag. This is in case we want to allow multiple block points in the future (perhaps to block rolling out to the next instance when having multiple instances) such that the placement becomes significant. --- .../config/application/api/DeploymentSpecTest.java | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'config-model-api/src/test/java/com/yahoo/config/application/api/DeploymentSpecTest.java') diff --git a/config-model-api/src/test/java/com/yahoo/config/application/api/DeploymentSpecTest.java b/config-model-api/src/test/java/com/yahoo/config/application/api/DeploymentSpecTest.java index 943432213ac..fbf685b9d86 100644 --- a/config-model-api/src/test/java/com/yahoo/config/application/api/DeploymentSpecTest.java +++ b/config-model-api/src/test/java/com/yahoo/config/application/api/DeploymentSpecTest.java @@ -309,6 +309,34 @@ public class DeploymentSpecTest { assertTrue(spec.canUpgradeAt(Instant.parse("2017-09-23T10:15:30.00Z"))); } + @Test(expected = IllegalArgumentException.class) + public void deploymentSpecWithIllegallyOrderedDeploymentSpec1() { + StringReader r = new StringReader( + "\n" + + " \n" + + " \n" + + " us-west-1\n" + + " \n" + + " \n" + + "" + ); + DeploymentSpec spec = DeploymentSpec.fromXml(r); + } + + @Test(expected = IllegalArgumentException.class) + public void deploymentSpecWithIllegallyOrderedDeploymentSpec2() { + StringReader r = new StringReader( + "\n" + + " \n" + + " \n" + + " \n" + + " us-west-1\n" + + " \n" + + "" + ); + DeploymentSpec spec = DeploymentSpec.fromXml(r); + } + @Test public void deploymentSpecWithChangeBlocker() { StringReader r = new StringReader( -- cgit v1.2.3