diff options
author | Jon Bratseth <bratseth@yahoo-inc.com> | 2016-06-22 15:17:04 +0200 |
---|---|---|
committer | Jon Bratseth <bratseth@yahoo-inc.com> | 2016-06-22 15:17:04 +0200 |
commit | e6addfc364e0890c52ada62a45252902c289d76d (patch) | |
tree | c276b2b1d0ac3def13a613a5abfb9781bf5bfb21 /config-model | |
parent | ea777a1c94a706caf0074e1d9bc3c3f70385f10c (diff) |
Make this work on mac again
Diffstat (limited to 'config-model')
2 files changed, 3 insertions, 35 deletions
diff --git a/config-model/src/test/java/com/yahoo/vespa/model/container/xml/ConfigServerContainerModelBuilderTest.java b/config-model/src/test/java/com/yahoo/vespa/model/container/xml/ConfigServerContainerModelBuilderTest.java deleted file mode 100644 index 7a8a554e650..00000000000 --- a/config-model/src/test/java/com/yahoo/vespa/model/container/xml/ConfigServerContainerModelBuilderTest.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -package com.yahoo.vespa.model.container.xml; - -import com.yahoo.config.model.deploy.DeployState; -import com.yahoo.config.model.application.provider.FilesApplicationPackage; -import com.yahoo.config.model.test.MockRoot; -import com.yahoo.cloud.config.ElkConfig; -import com.yahoo.text.XML; -import com.yahoo.vespa.model.container.configserver.TestOptions; -import org.junit.Test; - -import java.io.File; - -import static org.hamcrest.CoreMatchers.is; -import static org.junit.Assert.assertThat; - -/** - * @author lulf - * @since 5.17 - */ -public class ConfigServerContainerModelBuilderTest { - @Test - public void testHostedVespaInclude() { - File testApp = new File("src/test/cfg/container/data/configserverinclude"); - FilesApplicationPackage app = FilesApplicationPackage.fromFile(testApp); - MockRoot root = new MockRoot(); - new ConfigServerContainerModelBuilder(new TestOptions()).build(new DeployState.Builder().applicationPackage(app).build(), null, root, XML.getChild(XML.getDocument(app.getServices()).getDocumentElement(), "jdisc")); - root.freezeModelTopology(); - ElkConfig config = root.getConfig(ElkConfig.class, "configserver/configserver"); - assertThat(config.elasticsearch().size(), is(1)); - assertThat(config.elasticsearch(0).host(), is("foo")); - } -} diff --git a/config-model/src/test/java/com/yahoo/vespa/model/test/VespaModelTestCase.java b/config-model/src/test/java/com/yahoo/vespa/model/test/VespaModelTestCase.java index a86dc68d9dc..87fb5e567a5 100644 --- a/config-model/src/test/java/com/yahoo/vespa/model/test/VespaModelTestCase.java +++ b/config-model/src/test/java/com/yahoo/vespa/model/test/VespaModelTestCase.java @@ -31,6 +31,7 @@ import com.yahoo.vespa.config.UnknownConfigIdException; import com.yahoo.vespa.config.buildergen.ConfigDefinition; import com.yahoo.vespa.defaults.Defaults; import com.yahoo.vespa.model.ConfigProducer; +import com.yahoo.vespa.model.HostSystem; import com.yahoo.vespa.model.VespaModel; import com.yahoo.vespa.model.admin.Admin; import com.yahoo.vespa.model.admin.Configserver; @@ -101,7 +102,7 @@ public class VespaModelTestCase { LogdConfig.Builder b = new LogdConfig.Builder(); b = (LogdConfig.Builder) model.getConfig(b, ""); LogdConfig c = new LogdConfig(b); - assertEquals(c.logserver().host(), LinuxInetAddress.getLocalHost().getCanonicalHostName()); + assertEquals(HostSystem.lookupCanonicalHostname(HostName.getLocalhost()), c.logserver().host()); SlobroksConfig.Builder sb = new SlobroksConfig.Builder(); sb = (com.yahoo.cloud.config.SlobroksConfig.Builder) model.getConfig(sb, ""); @@ -112,7 +113,7 @@ public class VespaModelTestCase { zb = (ZookeepersConfig.Builder) model.getConfig(zb, ""); ZookeepersConfig zc = new ZookeepersConfig(zb); assertEquals(zc.zookeeperserverlist().split(",").length, 2); - assertTrue(zc.zookeeperserverlist().startsWith(LinuxInetAddress.getLocalHost().getCanonicalHostName())); + assertTrue(zc.zookeeperserverlist().startsWith(HostSystem.lookupCanonicalHostname(HostName.getLocalhost()))); ApplicationIdConfig.Builder appIdBuilder = new ApplicationIdConfig.Builder(); appIdBuilder = (ApplicationIdConfig.Builder) model.getConfig(appIdBuilder, ""); |