diff options
Diffstat (limited to 'config-model/src/test')
7 files changed, 3 insertions, 90 deletions
diff --git a/config-model/src/test/cfg/application/app_sdbundles/components/testbundle.jar b/config-model/src/test/cfg/application/app_sdbundles/components/testbundle.jar Binary files differdeleted file mode 100644 index 00749d776c2..00000000000 --- a/config-model/src/test/cfg/application/app_sdbundles/components/testbundle.jar +++ /dev/null diff --git a/config-model/src/test/cfg/application/app_sdbundles/components/testbundle2.jar b/config-model/src/test/cfg/application/app_sdbundles/components/testbundle2.jar Binary files differdeleted file mode 100644 index 36c97c2716c..00000000000 --- a/config-model/src/test/cfg/application/app_sdbundles/components/testbundle2.jar +++ /dev/null diff --git a/config-model/src/test/cfg/application/app_sdbundles/files/foo.txt b/config-model/src/test/cfg/application/app_sdbundles/files/foo.txt deleted file mode 100644 index b7d6715e2df..00000000000 --- a/config-model/src/test/cfg/application/app_sdbundles/files/foo.txt +++ /dev/null @@ -1 +0,0 @@ -FOO diff --git a/config-model/src/test/cfg/application/app_sdbundles/files/subdir/bar.txt b/config-model/src/test/cfg/application/app_sdbundles/files/subdir/bar.txt deleted file mode 100644 index ba578e48b18..00000000000 --- a/config-model/src/test/cfg/application/app_sdbundles/files/subdir/bar.txt +++ /dev/null @@ -1 +0,0 @@ -BAR diff --git a/config-model/src/test/cfg/application/app_sdbundles/hosts.xml b/config-model/src/test/cfg/application/app_sdbundles/hosts.xml deleted file mode 100644 index 9cbdd000786..00000000000 --- a/config-model/src/test/cfg/application/app_sdbundles/hosts.xml +++ /dev/null @@ -1,11 +0,0 @@ -<?xml version="1.0" encoding="utf-8" ?> -<!-- Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. --> -<hosts> - <host name="localhost"> - <alias>node1</alias> - </host> - <host name="schmocalhost"> - <alias>node2</alias> - </host> -</hosts> - diff --git a/config-model/src/test/cfg/application/app_sdbundles/services.xml b/config-model/src/test/cfg/application/app_sdbundles/services.xml deleted file mode 100644 index 6b59d13844a..00000000000 --- a/config-model/src/test/cfg/application/app_sdbundles/services.xml +++ /dev/null @@ -1,32 +0,0 @@ -<?xml version="1.0" encoding="utf-8" ?> -<!-- Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. --> -<services version="1.0"> - - <admin version="2.0"> - <adminserver hostalias="node1"/> - <slobroks> - <slobrok hostalias="node1"/> - <slobrok hostalias="node2"/> - </slobroks> - </admin> - - <container version="1.0"> - <nodes> - <node hostalias="node1" /> - </nodes> - - <search/> - <document-api/> - </container> - - <content id="music" version="1.0"> - <redundancy>1</redundancy> - <documents> - <document type="music" mode="index" /> - </documents> - <nodes> - <node hostalias="node1" distribution-key="0" /> - </nodes> - </content> - -</services> diff --git a/config-model/src/test/java/com/yahoo/config/model/ApplicationDeployTest.java b/config-model/src/test/java/com/yahoo/config/model/ApplicationDeployTest.java index fe82f2406f2..2c209dd79bf 100644 --- a/config-model/src/test/java/com/yahoo/config/model/ApplicationDeployTest.java +++ b/config-model/src/test/java/com/yahoo/config/model/ApplicationDeployTest.java @@ -2,21 +2,19 @@ package com.yahoo.config.model; import com.google.common.io.Files; -import com.yahoo.config.ConfigInstance; import com.yahoo.config.application.api.ApplicationMetaData; -import com.yahoo.config.application.api.UnparsedConfigDefinition; import com.yahoo.config.application.api.ApplicationPackage; +import com.yahoo.config.application.api.UnparsedConfigDefinition; import com.yahoo.config.model.application.provider.Bundle; import com.yahoo.config.model.application.provider.DeployData; import com.yahoo.config.model.application.provider.FilesApplicationPackage; import com.yahoo.config.model.deploy.DeployState; import com.yahoo.config.provision.ApplicationId; -import com.yahoo.path.Path; import com.yahoo.document.DataType; -import com.yahoo.document.config.DocumentmanagerConfig; import com.yahoo.io.IOUtils; -import com.yahoo.searchdefinition.Search; +import com.yahoo.path.Path; import com.yahoo.searchdefinition.DocumentOnlySearch; +import com.yahoo.searchdefinition.Search; import com.yahoo.vespa.config.ConfigDefinition; import com.yahoo.vespa.config.ConfigDefinitionKey; import com.yahoo.vespa.model.VespaModel; @@ -38,8 +36,6 @@ import java.util.List; import java.util.Map; import java.util.Set; import java.util.jar.JarEntry; -import java.util.jar.JarFile; -import java.util.regex.Pattern; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotEquals; @@ -134,28 +130,6 @@ public class ApplicationDeployTest { } @Test - public void testSdFromDocprocBundle() throws IOException, SAXException { - String appDir = "src/test/cfg/application/app_sdbundles"; - ApplicationPackageTester tester = ApplicationPackageTester.create(appDir); - VespaModel model = new VespaModel(tester.app()); - DocumentmanagerConfig.Builder b = new DocumentmanagerConfig.Builder(); - model.getConfig(b, VespaModel.ROOT_CONFIGID); - DocumentmanagerConfig dc = b.build(); - String docMan=ConfigInstance.serialize(dc).toString(); - int pFlags = Pattern.MULTILINE + Pattern.DOTALL; - Pattern base = Pattern.compile(".*name.*base\\.header.*", pFlags); - Pattern book = Pattern.compile(".*name.*book\\.header.*", pFlags); - Pattern music = Pattern.compile(".*name.*music\\.header.*", pFlags); - Pattern video = Pattern.compile(".*name.*video\\.header.*", pFlags); - Pattern muzak = Pattern.compile(".*name.*muzak\\.header.*", pFlags); - assertTrue(base.matcher(docMan).matches()); - assertTrue(book.matcher(docMan).matches()); - assertTrue(music.matcher(docMan).matches()); - assertTrue(video.matcher(docMan).matches()); - assertTrue(muzak.matcher(docMan).matches()); - } - - @Test public void include_dirs_are_included() { ApplicationPackageTester tester = ApplicationPackageTester.create(TESTDIR + "include_dirs"); @@ -234,22 +208,6 @@ public class ApplicationDeployTest { } @Test - public void testGetJars() throws IOException { - String jarName = "src/test/cfg/application/app_sdbundles/components/testbundle.jar"; - JarFile jar = new JarFile(jarName); - Map<String, String> payloads = ApplicationPackage.getBundleSdFiles("", jar); - assertEquals(payloads.size(), 4); - assertTrue(payloads.get("base.sd").startsWith("search base")); - assertTrue(payloads.get("book.sd").startsWith("search book")); - assertTrue(payloads.get("music.sd").startsWith("search music")); - assertTrue(payloads.get("video.sd").startsWith("search video")); - assertTrue(payloads.get("base.sd").endsWith("}")); - assertTrue(payloads.get("book.sd").endsWith("}\n")); - assertTrue(payloads.get("music.sd").endsWith("}\n")); - assertTrue(payloads.get("video.sd").endsWith("}\n")); - } - - @Test public void testConfigDefinitionsFromJars() { String appName = "src/test/cfg//application/app1"; FilesApplicationPackage app = FilesApplicationPackage.fromFile(new File(appName), false); |