Skip to content

Commit

Permalink
Updates matcher to use hasItem (opensearch-project#2018)
Browse files Browse the repository at this point in the history
Signed-off-by: Darshit Chanpura <[email protected]>

Signed-off-by: Darshit Chanpura <[email protected]>
  • Loading branch information
DarshitChanpura authored Aug 10, 2022
1 parent 7eaaafe commit 63edf43
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import org.junit.Test;

import static org.hamcrest.Matchers.anEmptyMap;
import static org.hamcrest.Matchers.contains;
import static org.hamcrest.Matchers.hasItem;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.not;

Expand All @@ -44,7 +44,7 @@ private void verifyPluginInstallationOnAllNodes() throws Exception {
List<Map<String, Object>> plugins = (List<Map<String, Object>>) node.get("plugins");
Set<Object> pluginNames = plugins.stream().map(map -> map.get("name")).collect(Collectors.toSet());

MatcherAssert.assertThat(pluginNames, contains(SECURITY_PLUGIN_NAME));
MatcherAssert.assertThat(pluginNames, hasItem(SECURITY_PLUGIN_NAME));
}
MatcherAssert.assertThat(nodesInCluster, is(not(anEmptyMap())));
}
Expand Down

0 comments on commit 63edf43

Please sign in to comment.