diff options
author | Jon Marius Venstad <jvenstad@yahoo-inc.com> | 2017-12-08 14:08:40 +0100 |
---|---|---|
committer | Jon Marius Venstad <jvenstad@yahoo-inc.com> | 2017-12-08 14:08:40 +0100 |
commit | e5f2b434d614b49bef40038ec1fe1d391db62e1e (patch) | |
tree | 1c1c7c53a262ee9476b2ec90d683b885a16c374c /configserver | |
parent | e01d121d3bdc736fcf8c75011c2dc5eff2941c27 (diff) |
Factory constructor with region/env
Diffstat (limited to 'configserver')
2 files changed, 4 insertions, 4 deletions
diff --git a/configserver/src/test/java/com/yahoo/vespa/config/server/http/v2/ListApplicationsHandlerTest.java b/configserver/src/test/java/com/yahoo/vespa/config/server/http/v2/ListApplicationsHandlerTest.java index 9e7853a8fdf..7700dd9392e 100644 --- a/configserver/src/test/java/com/yahoo/vespa/config/server/http/v2/ListApplicationsHandlerTest.java +++ b/configserver/src/test/java/com/yahoo/vespa/config/server/http/v2/ListApplicationsHandlerTest.java @@ -42,7 +42,7 @@ public class ListApplicationsHandlerTest { handler = new ListApplicationsHandler(Runnable::run, AccessLog.voidAccessLog(), tenants, - new Zone(Environment.dev, RegionName.from("us-east"))); + Zone.from(Environment.dev, RegionName.from("us-east"))); } @Test diff --git a/configserver/src/test/java/com/yahoo/vespa/config/server/model/LbServicesProducerTest.java b/configserver/src/test/java/com/yahoo/vespa/config/server/model/LbServicesProducerTest.java index df8ed405fe3..5e7886f0d2f 100644 --- a/configserver/src/test/java/com/yahoo/vespa/config/server/model/LbServicesProducerTest.java +++ b/configserver/src/test/java/com/yahoo/vespa/config/server/model/LbServicesProducerTest.java @@ -87,11 +87,11 @@ public class LbServicesProducerTest { } private LbServicesConfig createModelAndGetLbServicesConfig(RegionName regionName) throws IOException, SAXException { - final Zone zone = new Zone(Environment.prod, regionName); + final Zone zone = Zone.from(Environment.prod, regionName); Map<TenantName, Map<ApplicationId, ApplicationInfo>> testModel = createTestModel(new DeployState.Builder() .properties(new DeployProperties.Builder().zone(zone).build()) .zone(zone)); - return getLbServicesConfig(new Zone(Environment.prod, regionName), testModel); + return getLbServicesConfig(Zone.from(Environment.prod, regionName), testModel); } private LbServicesConfig getLbServicesConfig(Zone zone, Map<TenantName, Map<ApplicationId, ApplicationInfo>> testModel) { @@ -105,7 +105,7 @@ public class LbServicesProducerTest { public void testConfigAliasesWithRotations() throws IOException, SAXException { Map<TenantName, Map<ApplicationId, ApplicationInfo>> testModel = createTestModel(new DeployState.Builder().rotations(rotations)); RegionName regionName = RegionName.from("us-east-1"); - LbServicesConfig conf = getLbServicesConfig(new Zone(Environment.prod, regionName), testModel); + LbServicesConfig conf = getLbServicesConfig(Zone.from(Environment.prod, regionName), testModel); final LbServicesConfig.Tenants.Applications.Hosts.Services services = conf.tenants("foo").applications("foo:prod:" + regionName.value() + ":default").hosts("foo.foo.yahoo.com").services("qrserver"); assertThat(services.servicealiases().size(), is(1)); assertThat(services.endpointaliases().size(), is(4)); |