use of com.alipay.sofa.ark.container.pipeline.HandleArchiveStage in project sofa-ark by alipay.
the class HandleArchiveTest method testExcludeBiz.
@Test
public void testExcludeBiz() {
try {
HandleArchiveStage handleArchiveStage = new HandleArchiveStage();
System.setProperty(BIZ_ACTIVE_EXCLUDE, "bizA:1.0.0,bizB:1.0.0");
BizModel bizModel = new BizModel();
bizModel.setBizName("bizA").setBizVersion("1.0.0");
Assert.assertTrue(handleArchiveStage.isBizExcluded(bizModel));
bizModel.setBizName("bizB");
Assert.assertTrue(handleArchiveStage.isBizExcluded(bizModel));
bizModel.setBizName("bizC");
Assert.assertFalse(handleArchiveStage.isBizExcluded(bizModel));
} finally {
System.clearProperty(BIZ_ACTIVE_EXCLUDE);
}
}
use of com.alipay.sofa.ark.container.pipeline.HandleArchiveStage in project sofa-ark by alipay.
the class HandleArchiveTest method testExcludePlugin.
@Test
public void testExcludePlugin() {
try {
HandleArchiveStage handleArchiveStage = new HandleArchiveStage();
System.setProperty(PLUGIN_ACTIVE_EXCLUDE, "pluginA,pluginB");
PluginModel pluginModel = new PluginModel();
pluginModel.setPluginName("pluginA");
Assert.assertTrue(handleArchiveStage.isPluginExcluded(pluginModel));
pluginModel.setPluginName("pluginB");
Assert.assertTrue(handleArchiveStage.isPluginExcluded(pluginModel));
pluginModel.setPluginName("pluginC");
Assert.assertFalse(handleArchiveStage.isPluginExcluded(pluginModel));
} finally {
System.clearProperty(PLUGIN_ACTIVE_EXCLUDE);
}
}
use of com.alipay.sofa.ark.container.pipeline.HandleArchiveStage in project sofa-ark by alipay.
the class HandleArchiveTest method testNoIncludeExcludePlugin.
@Test
public void testNoIncludeExcludePlugin() {
HandleArchiveStage handleArchiveStage = new HandleArchiveStage();
BizModel bizModel = new BizModel();
bizModel.setBizName("bizA").setBizVersion("1.0.0");
Assert.assertFalse(handleArchiveStage.isBizExcluded(bizModel));
bizModel.setBizName("bizB");
Assert.assertFalse(handleArchiveStage.isBizExcluded(bizModel));
}
Aggregations