From b65cd89989ead7082089bf6f333e56b03f619606 Mon Sep 17 00:00:00 2001 From: Jan Srnicek Date: Thu, 13 Jul 2017 20:21:01 +0200 Subject: HONEYCOMB-360 - Restconf Northbound Intefaces provider separation - Restconf configuration included under restconf.json Change-Id: I45f503d3ef383bd6e3d356308d3212c7314b7a28 Signed-off-by: Jan Srnicek --- .../fd/honeycomb/infra/distro/BaseMinimalDistributionTest.java | 3 ++- .../infra/distro/activation/ActiveModuleProviderTest.java | 9 +++------ 2 files changed, 5 insertions(+), 7 deletions(-) (limited to 'infra/minimal-distribution-test/src/test/java/io/fd') diff --git a/infra/minimal-distribution-test/src/test/java/io/fd/honeycomb/infra/distro/BaseMinimalDistributionTest.java b/infra/minimal-distribution-test/src/test/java/io/fd/honeycomb/infra/distro/BaseMinimalDistributionTest.java index e39dba8a0..8377dc4c8 100644 --- a/infra/minimal-distribution-test/src/test/java/io/fd/honeycomb/infra/distro/BaseMinimalDistributionTest.java +++ b/infra/minimal-distribution-test/src/test/java/io/fd/honeycomb/infra/distro/BaseMinimalDistributionTest.java @@ -28,6 +28,7 @@ import com.jcraft.jsch.JSch; import com.jcraft.jsch.Session; import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; +import io.fd.honeycomb.infra.distro.activation.ActivationModule; import java.io.IOException; import java.io.InputStream; import java.net.Socket; @@ -76,7 +77,7 @@ public class BaseMinimalDistributionTest { */ @Test(timeout = 120000) public void test() throws Exception { - Main.init(); + Main.init(new ActivationModule()); LOG.info("Testing Honeycomb base distribution"); LOG.info("Testing NETCONF TCP"); diff --git a/infra/minimal-distribution-test/src/test/java/io/fd/honeycomb/infra/distro/activation/ActiveModuleProviderTest.java b/infra/minimal-distribution-test/src/test/java/io/fd/honeycomb/infra/distro/activation/ActiveModuleProviderTest.java index b411d043e..0a9bd9cdf 100644 --- a/infra/minimal-distribution-test/src/test/java/io/fd/honeycomb/infra/distro/activation/ActiveModuleProviderTest.java +++ b/infra/minimal-distribution-test/src/test/java/io/fd/honeycomb/infra/distro/activation/ActiveModuleProviderTest.java @@ -19,12 +19,10 @@ package io.fd.honeycomb.infra.distro.activation; import static com.google.common.collect.ImmutableList.of; import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.empty; import static org.hamcrest.Matchers.hasItem; import static org.hamcrest.Matchers.hasItems; import static org.hamcrest.Matchers.hasSize; import static org.hamcrest.Matchers.isA; -import static org.hamcrest.core.Is.is; import com.google.common.collect.ImmutableList; import com.google.inject.Module; @@ -74,7 +72,7 @@ public class ActiveModuleProviderTest { @Test public void testAggregateResourcesNonEmpty() { final List aggregatedResources = - ActiveModuleProvider.aggregateResources("modules", this.getClass().getClassLoader()); + new ActiveModuleProvider().aggregateResources("modules"); assertThat(aggregatedResources, hasSize(5)); assertThat(aggregatedResources, hasItems(" Non-commented non-trimmed", "//Commented", @@ -83,10 +81,9 @@ public class ActiveModuleProviderTest { "// Line from second file")); } - @Test + @Test(expected = IllegalStateException.class) public void testAggregateResourcesEmpty() { - assertThat(ActiveModuleProvider.aggregateResources("/non-existing-folder", this.getClass().getClassLoader()), - is(empty())); + new ActiveModuleProvider().aggregateResources("/non-existing-folder"); } } -- cgit 1.2.3-korg