Marvel: Fix compilation issues in tests

Original commit: elastic/x-pack-elasticsearch@9ffc4c501b
This commit is contained in:
Alexander Reelsen 2016-01-29 15:15:25 +01:00
parent 7147354525
commit 4e1d44110b
2 changed files with 3 additions and 4 deletions

View File

@ -45,7 +45,7 @@ public class MarvelPlugin extends Plugin {
public static final String ENABLED = NAME + ".enabled"; public static final String ENABLED = NAME + ".enabled";
public static final Setting<String> INDEX_MARVEL_VERSION_SETTING = new Setting<>("index.marvel.plugin.version", "", Function.identity(), false, Setting.Scope.INDEX); public static final Setting<String> INDEX_MARVEL_VERSION_SETTING = new Setting<>("index.marvel.plugin.version", "", Function.identity(), false, Setting.Scope.INDEX);
public static final Setting<String> INDEX_MARVEL_TEMPLATE_VERSION_SETTING = new Setting<>("index.marvel.template.version", "", Function.identity(), false, Setting.Scope.INDEX); public static final Setting<String> INDEX_MARVEL_TEMPLATE_VERSION_SETTING = new Setting<>("index.marvel.template.version", "", Function.identity(), false, Setting.Scope.INDEX);
private static final String TRIBE_NAME_SETTING = "tribe.name"; public static final String TRIBE_NAME_SETTING = "tribe.name";
private final Settings settings; private final Settings settings;
private final boolean enabled; private final boolean enabled;

View File

@ -14,7 +14,6 @@ import org.elasticsearch.marvel.shield.MarvelShieldIntegration;
import org.elasticsearch.marvel.test.MarvelIntegTestCase; import org.elasticsearch.marvel.test.MarvelIntegTestCase;
import org.elasticsearch.plugins.PluginInfo; import org.elasticsearch.plugins.PluginInfo;
import org.elasticsearch.test.ESIntegTestCase.ClusterScope; import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import org.elasticsearch.tribe.TribeService;
import org.elasticsearch.xpack.XPackPlugin; import org.elasticsearch.xpack.XPackPlugin;
import static org.elasticsearch.test.ESIntegTestCase.Scope.TEST; import static org.elasticsearch.test.ESIntegTestCase.Scope.TEST;
@ -43,14 +42,14 @@ public class MarvelPluginTests extends MarvelIntegTestCase {
} }
public void testMarvelEnabledOnTribeNode() { public void testMarvelEnabledOnTribeNode() {
internalCluster().startNode(Settings.builder().put(MarvelPlugin.ENABLED, true).put(TribeService.TRIBE_NAME, "t1").build()); internalCluster().startNode(Settings.builder().put(MarvelPlugin.ENABLED, true).put(MarvelPlugin.TRIBE_NAME_SETTING, "t1").build());
assertPluginIsLoaded(); assertPluginIsLoaded();
assertServiceIsBound(AgentService.class); assertServiceIsBound(AgentService.class);
assertServiceIsBound(MarvelShieldIntegration.class); assertServiceIsBound(MarvelShieldIntegration.class);
} }
public void testMarvelDisabledOnTribeNode() { public void testMarvelDisabledOnTribeNode() {
internalCluster().startNode(Settings.builder().put(TribeService.TRIBE_NAME, "t1").build()); internalCluster().startNode(Settings.builder().put(MarvelPlugin.TRIBE_NAME_SETTING, "t1").build());
assertPluginIsLoaded(); assertPluginIsLoaded();
assertServiceIsNotBound(AgentService.class); assertServiceIsNotBound(AgentService.class);
assertServiceIsBound(MarvelShieldIntegration.class); assertServiceIsBound(MarvelShieldIntegration.class);