Skip to content

Commit

Permalink
Add WhoAmI test
Browse files Browse the repository at this point in the history
Signed-off-by: Craig Perkins <[email protected]>
  • Loading branch information
cwperks committed Aug 29, 2023
1 parent 2545807 commit 7fb2ef2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions bwc-test/src/test/java/SecurityBackwardsCompatibilityIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
import org.opensearch.client.RestClient;
import org.opensearch.client.RestClientBuilder;

import org.junit.Assert;

public class SecurityBackwardsCompatibilityIT extends OpenSearchRestTestCase {

private ClusterType CLUSTER_TYPE;
Expand Down Expand Up @@ -133,6 +135,12 @@ public void testBasicBackwardsCompatibility() throws Exception {
}
}

@SuppressWarnings("unchecked")
public void testWhoAmI() throws Exception {
Map<String, Object> responseMap = (Map<String, Object>) getAsMap("_plugins/_security/whoami");
Assert.assertTrue(responseMap.containsKey("dn"));
}

private enum ClusterType {
OLD,
MIXED,
Expand Down

0 comments on commit 7fb2ef2

Please sign in to comment.