diff options
author | gjoranv <gv@verizonmedia.com> | 2021-09-27 23:00:59 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-27 23:00:59 +0200 |
commit | 037f756caf4cfb99bcd988174839d7bc385267b9 (patch) | |
tree | dbacdd333b8c9b3fc5662b0da8f737d8110bcc7c /config-model/src/test/java/com | |
parent | 990421550d364fda626b4ba3e4c16730f38c74ae (diff) | |
parent | b5286c811ada6d1aacce5498b7e9fbdff6d33576 (diff) |
Merge pull request #19277 from vespa-engine/revert-19276-revert-19096-install-common-bundles-via-config-model
Reapply "Install common bundles via config model"
Diffstat (limited to 'config-model/src/test/java/com')
3 files changed, 4 insertions, 7 deletions
diff --git a/config-model/src/test/java/com/yahoo/vespa/model/admin/metricsproxy/MetricsProxyContainerClusterTest.java b/config-model/src/test/java/com/yahoo/vespa/model/admin/metricsproxy/MetricsProxyContainerClusterTest.java index 413daefdf75..4359e90e8a2 100644 --- a/config-model/src/test/java/com/yahoo/vespa/model/admin/metricsproxy/MetricsProxyContainerClusterTest.java +++ b/config-model/src/test/java/com/yahoo/vespa/model/admin/metricsproxy/MetricsProxyContainerClusterTest.java @@ -51,8 +51,7 @@ public class MetricsProxyContainerClusterTest { var builder = new PlatformBundlesConfig.Builder(); model.getConfig(builder, CLUSTER_CONFIG_ID); PlatformBundlesConfig config = builder.build(); - assertEquals(1, config.bundlePaths().size()); - assertThat(config.bundlePaths(0), endsWith(METRICS_PROXY_BUNDLE_FILE.toString())); + assertThat(config.bundlePaths(), hasItem(endsWith(METRICS_PROXY_BUNDLE_FILE.toString()))); } @Test diff --git a/config-model/src/test/java/com/yahoo/vespa/model/container/ContainerClusterTest.java b/config-model/src/test/java/com/yahoo/vespa/model/container/ContainerClusterTest.java index dd4f4c3b7d5..a66ea736a5b 100755 --- a/config-model/src/test/java/com/yahoo/vespa/model/container/ContainerClusterTest.java +++ b/config-model/src/test/java/com/yahoo/vespa/model/container/ContainerClusterTest.java @@ -38,8 +38,8 @@ import java.util.Iterator; import java.util.List; import java.util.stream.Collectors; +import static org.hamcrest.Matchers.hasItem; import static org.hamcrest.Matchers.hasKey; -import static org.hamcrest.collection.IsIterableContainingInAnyOrder.containsInAnyOrder; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertThat; @@ -383,10 +383,7 @@ public class ContainerClusterTest { cluster.getConfig(bundleBuilder); List<String> installedBundles = bundleBuilder.build().bundlePaths(); - assertEquals(expectedBundleNames.size(), installedBundles.size()); - assertThat(installedBundles, containsInAnyOrder( - expectedBundleNames.stream().map(CoreMatchers::endsWith).collect(Collectors.toList()) - )); + expectedBundleNames.forEach(b -> assertThat(installedBundles, hasItem(CoreMatchers.endsWith(b)))); } diff --git a/config-model/src/test/java/com/yahoo/vespa/model/container/xml/BundleInstantiationSpecificationBuilderTest.java b/config-model/src/test/java/com/yahoo/vespa/model/container/xml/BundleInstantiationSpecificationBuilderTest.java index 70ae6a27324..4f715375e1f 100644 --- a/config-model/src/test/java/com/yahoo/vespa/model/container/xml/BundleInstantiationSpecificationBuilderTest.java +++ b/config-model/src/test/java/com/yahoo/vespa/model/container/xml/BundleInstantiationSpecificationBuilderTest.java @@ -5,6 +5,7 @@ import com.yahoo.component.ComponentSpecification; import com.yahoo.config.model.builder.xml.XmlHelper; import com.yahoo.container.bundle.BundleInstantiationSpecification; import com.yahoo.search.grouping.GroupingValidator; +import com.yahoo.vespa.model.container.PlatformBundles; import org.junit.Test; import org.w3c.dom.Element; import org.xml.sax.SAXException; |