diff options
author | Jon Bratseth <bratseth@yahoo-inc.com> | 2017-04-19 13:00:52 +0200 |
---|---|---|
committer | Jon Bratseth <bratseth@yahoo-inc.com> | 2017-04-19 13:00:52 +0200 |
commit | 43ccb0583cf52cfdc75df493bda4b60dd5263eed (patch) | |
tree | 05c9c77f55fd60be96bcb673e2c0fd7c25aeaa76 /configserver | |
parent | 16b11bcc414e23d1f901a98d712212f1c7c9d2df (diff) |
Always pass wanted Vespa version
Diffstat (limited to 'configserver')
-rw-r--r-- | configserver/src/test/java/com/yahoo/vespa/config/server/session/PrepareParamsTest.java | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/configserver/src/test/java/com/yahoo/vespa/config/server/session/PrepareParamsTest.java b/configserver/src/test/java/com/yahoo/vespa/config/server/session/PrepareParamsTest.java index afeb84c02b4..08cb5c92c1b 100644 --- a/configserver/src/test/java/com/yahoo/vespa/config/server/session/PrepareParamsTest.java +++ b/configserver/src/test/java/com/yahoo/vespa/config/server/session/PrepareParamsTest.java @@ -1,10 +1,10 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespa.config.server.session; +import com.yahoo.component.Version; import com.yahoo.config.provision.ApplicationId; import com.yahoo.config.provision.Rotation; import com.yahoo.config.provision.TenantName; -import com.yahoo.config.provision.Version; import com.yahoo.container.jdisc.HttpRequest; import org.junit.Test; @@ -28,8 +28,7 @@ public class PrepareParamsTest { @Test public void testCorrectParsing() { - PrepareParams prepareParams = createParams("http://foo:19071/application/v2/", - TenantName.defaultName()); + PrepareParams prepareParams = createParams("http://foo:19071/application/v2/", TenantName.defaultName()); assertThat(prepareParams.getApplicationId(), is(ApplicationId.defaultId())); assertFalse(prepareParams.isDryRun()); @@ -51,28 +50,28 @@ public class PrepareParamsTest { @Test public void testCorrectParsingWithRotation() { PrepareParams prepareParams = createParams(request + "&" + - PrepareParams.ROTATIONS_PARAM_NAME + "=" + rotation, - TenantName.from("foo")); + PrepareParams.ROTATIONS_PARAM_NAME + "=" + rotation, + TenantName.from("foo")); assertThat(prepareParams.getApplicationId().serializedForm(), is("foo:baz:default")); assertTrue(prepareParams.isDryRun()); assertFalse(prepareParams.ignoreValidationErrors()); - final Version expectedVersion = Version.fromString(vespaVersion); + Version expectedVersion = Version.fromString(vespaVersion); assertThat(prepareParams.vespaVersion().get(), is(expectedVersion)); assertTrue(prepareParams.getTimeoutBudget().hasTimeLeft()); - final Set<Rotation> rotations = prepareParams.rotations(); + Set<Rotation> rotations = prepareParams.rotations(); assertThat(rotations.size(), is(1)); assertThat(rotations, contains(equalTo(new Rotation(rotation)))); } @Test public void testCorrectParsingWithSeveralRotations() { - final String rotationTwo = "rotation-043.vespa.a02.yahoodns.net"; - final String twoRotations = rotation + "," + rotationTwo; + String rotationTwo = "rotation-043.vespa.a02.yahoodns.net"; + String twoRotations = rotation + "," + rotationTwo; PrepareParams prepareParams = createParams(request + "&" + - PrepareParams.ROTATIONS_PARAM_NAME + "=" + twoRotations, - TenantName.from("foo")); - final Set<Rotation> rotations = prepareParams.rotations(); + PrepareParams.ROTATIONS_PARAM_NAME + "=" + twoRotations, + TenantName.from("foo")); + Set<Rotation> rotations = prepareParams.rotations(); assertThat(rotations, containsInAnyOrder(new Rotation(rotation), new Rotation(rotationTwo))); } |