diff options
Diffstat (limited to 'infra/bgp-distribution/src/test')
3 files changed, 18 insertions, 35 deletions
diff --git a/infra/bgp-distribution/src/test/java/io/fd/honeycomb/infra/bgp/distro/BgpDistributionTest.java b/infra/bgp-distribution/src/test/java/io/fd/honeycomb/infra/bgp/distro/BgpDistributionTest.java index d205b95a8..be927a64e 100644 --- a/infra/bgp-distribution/src/test/java/io/fd/honeycomb/infra/bgp/distro/BgpDistributionTest.java +++ b/infra/bgp-distribution/src/test/java/io/fd/honeycomb/infra/bgp/distro/BgpDistributionTest.java @@ -16,30 +16,12 @@ package io.fd.honeycomb.infra.bgp.distro; -import static com.google.common.collect.ImmutableSet.of; - import com.google.common.io.ByteStreams; -import com.google.inject.Module; import com.mashape.unirest.http.Unirest; -import io.fd.honeycomb.infra.bgp.BgpConfigurationModule; -import io.fd.honeycomb.infra.bgp.BgpExtensionsModule; -import io.fd.honeycomb.infra.bgp.BgpModule; -import io.fd.honeycomb.infra.bgp.BgpReadersModule; -import io.fd.honeycomb.infra.bgp.BgpWritersModule; -import io.fd.honeycomb.infra.distro.cfgattrs.CfgAttrsModule; -import io.fd.honeycomb.infra.distro.data.ConfigAndOperationalPipelineModule; -import io.fd.honeycomb.infra.distro.data.context.ContextPipelineModule; -import io.fd.honeycomb.infra.distro.initializer.InitializerPipelineModule; -import io.fd.honeycomb.infra.distro.netconf.NetconfModule; -import io.fd.honeycomb.infra.distro.netconf.NetconfReadersModule; -import io.fd.honeycomb.infra.distro.restconf.RestconfModule; -import io.fd.honeycomb.infra.distro.schema.SchemaModule; -import io.fd.honeycomb.infra.distro.schema.YangBindingProviderModule; import java.io.IOException; import java.io.InputStream; import java.net.InetAddress; import java.net.Socket; -import java.util.Set; import javax.net.ssl.SSLContext; import org.apache.http.conn.ssl.SSLConnectionSocketFactory; import org.apache.http.conn.ssl.TrustSelfSignedStrategy; @@ -62,22 +44,6 @@ public class BgpDistributionTest { private static final byte BGP_OPEN_MSG_TYPE = 1; private static final int BGP_PORT = 1790; - public static final Set<Module> BASE_MODULES = of( - new YangBindingProviderModule(), - new SchemaModule(), - new ConfigAndOperationalPipelineModule(), - new ContextPipelineModule(), - new InitializerPipelineModule(), - new NetconfModule(), - new NetconfReadersModule(), - new RestconfModule(), - new CfgAttrsModule(), - new BgpModule(), - new BgpExtensionsModule(), - new BgpReadersModule(), - new BgpWritersModule(), - new BgpConfigurationModule()); - @Before public void setUp() throws Exception { SSLContext sslcontext = SSLContexts.custom() @@ -94,7 +60,7 @@ public class BgpDistributionTest { @Test(timeout = 120000) public void test() throws Exception { - io.fd.honeycomb.infra.bgp.distro.Main.init(BASE_MODULES); + io.fd.honeycomb.infra.bgp.distro.Main.init(); LOG.info("Testing Honeycomb BGP distribution"); assertBgp(); } diff --git a/infra/bgp-distribution/src/test/resources/activation.json b/infra/bgp-distribution/src/test/resources/activation.json new file mode 100644 index 000000000..7e2015123 --- /dev/null +++ b/infra/bgp-distribution/src/test/resources/activation.json @@ -0,0 +1,3 @@ +{ + "modules-resource-path": "base-distro-test-modules" +}
\ No newline at end of file diff --git a/infra/bgp-distribution/src/test/resources/base-distro-test-modules/base-modules b/infra/bgp-distribution/src/test/resources/base-distro-test-modules/base-modules new file mode 100644 index 000000000..18602a0ad --- /dev/null +++ b/infra/bgp-distribution/src/test/resources/base-distro-test-modules/base-modules @@ -0,0 +1,14 @@ +io.fd.honeycomb.infra.bgp.BgpConfigurationModule +io.fd.honeycomb.infra.bgp.BgpExtensionsModule +io.fd.honeycomb.infra.bgp.BgpModule +io.fd.honeycomb.infra.bgp.BgpReadersModule +io.fd.honeycomb.infra.bgp.BgpWritersModule +io.fd.honeycomb.infra.distro.cfgattrs.CfgAttrsModule +io.fd.honeycomb.infra.distro.data.ConfigAndOperationalPipelineModule +io.fd.honeycomb.infra.distro.data.context.ContextPipelineModule +io.fd.honeycomb.infra.distro.initializer.InitializerPipelineModule +io.fd.honeycomb.infra.distro.netconf.NetconfModule +io.fd.honeycomb.infra.distro.netconf.NetconfReadersModule +io.fd.honeycomb.infra.distro.restconf.RestconfModule +io.fd.honeycomb.infra.distro.schema.SchemaModule +io.fd.honeycomb.infra.distro.schema.YangBindingProviderModule
\ No newline at end of file |