fix tests

Original commit: elastic/x-pack-elasticsearch@54d56efdbd
This commit is contained in:
Robert Muir 2015-12-04 02:12:08 -05:00
parent b56aa9064d
commit 3ec04ba40f
3 changed files with 6 additions and 6 deletions

View File

@ -50,7 +50,7 @@ public class MarvelPluginTests extends MarvelIntegTestCase {
assertNotNull(nodeInfo.getPlugins());
boolean found = false;
for (PluginInfo plugin : nodeInfo.getPlugins().getInfos()) {
for (PluginInfo plugin : nodeInfo.getPlugins().getPluginInfos()) {
assertNotNull(plugin);
if (MarvelPlugin.NAME.equals(plugin.getName())) {

View File

@ -10,7 +10,7 @@
- do:
nodes.info: {}
- match: { nodes.$master.plugins.15.name: license }
- match: { nodes.$master.plugins.19.name: marvel-agent }
- match: { nodes.$master.plugins.22.name: shield }
- match: { nodes.$master.plugins.25.name: watcher }
- match: { nodes.$master.plugins.13.name: license }
- match: { nodes.$master.plugins.17.name: marvel-agent }
- match: { nodes.$master.plugins.20.name: shield }
- match: { nodes.$master.plugins.23.name: watcher }

View File

@ -126,7 +126,7 @@ public abstract class ShieldIntegTestCase extends ESIntegTestCase {
for (NodeInfo nodeInfo : nodeInfos) {
// TODO: disable this assertion for now, because the test framework randomly runs with mock plugins. Maybe we should run without mock plugins?
// assertThat(nodeInfo.getPlugins().getInfos(), hasSize(2));
Collection<String> pluginNames = nodeInfo.getPlugins().getInfos().stream().map(p -> p.getName()).collect(Collectors.toList());
Collection<String> pluginNames = nodeInfo.getPlugins().getPluginInfos().stream().map(p -> p.getName()).collect(Collectors.toList());
assertThat("plugin [" + ShieldPlugin.NAME + "] not found in [" + pluginNames + "]", pluginNames.contains(ShieldPlugin.NAME), is(true));
assertThat("plugin [" + licensePluginName() + "] not found in [" + pluginNames + "]", pluginNames.contains(licensePluginName()), is(true));
}