diff options
author | Harald Musum <musum@yahooinc.com> | 2022-12-03 14:40:39 +0100 |
---|---|---|
committer | Harald Musum <musum@yahooinc.com> | 2022-12-03 14:41:03 +0100 |
commit | d603afa302dc5911eda46360f08ff708f19c2a1a (patch) | |
tree | b71d498b48242cab42e18542a57c51cc6397233a /config-model/src/test | |
parent | afcf1bb71cb7b87a03149d197f724cfc7603ef92 (diff) |
Remove unused and undocumented support for permanent-services.xml
Diffstat (limited to 'config-model/src/test')
4 files changed, 8 insertions, 37 deletions
diff --git a/config-model/src/test/cfg/application/app_permanent/permanent-services.xml b/config-model/src/test/cfg/application/app_permanent/permanent-services.xml deleted file mode 100644 index bf00993d3e2..00000000000 --- a/config-model/src/test/cfg/application/app_permanent/permanent-services.xml +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="utf-8" ?> -<!-- Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. --> -<services version="1.0"> - <container version="1.0"> - <search /> - </container> -</services> diff --git a/config-model/src/test/java/com/yahoo/config/model/MockModelContext.java b/config-model/src/test/java/com/yahoo/config/model/MockModelContext.java index 49b4e9820de..af05a144b79 100644 --- a/config-model/src/test/java/com/yahoo/config/model/MockModelContext.java +++ b/config-model/src/test/java/com/yahoo/config/model/MockModelContext.java @@ -47,11 +47,6 @@ public class MockModelContext implements ModelContext { } @Override - public Optional<ApplicationPackage> permanentApplicationPackage() { - return Optional.empty(); - } - - @Override public HostProvisioner getHostProvisioner() { return DeployState.getDefaultModelHostProvisioner(applicationPackage); } diff --git a/config-model/src/test/java/com/yahoo/config/model/deploy/DeployStateTest.java b/config-model/src/test/java/com/yahoo/config/model/deploy/DeployStateTest.java index f0b729a718c..e0726e9443c 100644 --- a/config-model/src/test/java/com/yahoo/config/model/deploy/DeployStateTest.java +++ b/config-model/src/test/java/com/yahoo/config/model/deploy/DeployStateTest.java @@ -16,16 +16,16 @@ import com.yahoo.vespa.config.ConfigDefinitionKey; import com.yahoo.vespa.model.VespaModel; import org.junit.jupiter.api.Test; import org.xml.sax.SAXException; - import java.io.File; import java.io.IOException; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; -import java.util.Optional; import java.util.Set; -import static org.junit.jupiter.api.Assertions.*; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; /** * @author Ulf Lilleengen @@ -42,15 +42,6 @@ public class DeployStateTest { } @Test - void testBuilder() { - DeployState.Builder builder = new DeployState.Builder(); - ApplicationPackage app = MockApplicationPackage.createEmpty(); - builder.permanentApplicationPackage(Optional.of(app)); - DeployState state = builder.build(); - assertEquals(app, state.getPermanentApplicationPackage().get()); - } - - @Test void testPreviousModelIsProvided() throws IOException, SAXException { VespaModel prevModel = new VespaModel(MockApplicationPackage.createEmpty()); DeployState.Builder builder = new DeployState.Builder(); 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 1aa010020f5..68782b947e3 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 @@ -34,18 +34,20 @@ import com.yahoo.vespa.model.test.utils.VespaModelCreatorWithMockPkg; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.xml.sax.SAXException; - import java.io.File; import java.io.IOException; import java.io.StringReader; import java.util.ArrayList; import java.util.List; import java.util.Map; -import java.util.Optional; import java.util.Set; import java.util.logging.Level; -import static org.junit.jupiter.api.Assertions.*; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; /** * @author gjoranv @@ -294,16 +296,6 @@ public class VespaModelTestCase { } @Test - void testPermanentServices() throws IOException, SAXException { - ApplicationPackage app = MockApplicationPackage.createEmpty(); - DeployState.Builder builder = new DeployState.Builder().applicationPackage(app); - VespaModel model = new VespaModel(new NullConfigModelRegistry(), builder.build()); - assertTrue(model.getContainerClusters().isEmpty()); - model = new VespaModel(new NullConfigModelRegistry(), builder.permanentApplicationPackage(Optional.of(FilesApplicationPackage.fromFile(new File(TESTDIR, "app_permanent")))).build()); - assertEquals(1, model.getContainerClusters().size()); - } - - @Test void testThatDeployLogContainsWarningWhenUsingSearchdefinitionsDir() throws IOException, SAXException { ApplicationPackage app = FilesApplicationPackage.fromFile( new File("src/test/cfg/application/deprecated_features_app/")); |