From 9b568986c5fbd184f99f0a3a0d247fe7a3245e63 Mon Sep 17 00:00:00 2001 From: Stevan Buzejic Date: Thu, 5 Jan 2023 22:54:12 +0100 Subject: [PATCH] Updated tests Signed-off-by: Stevan Buzejic --- .../securityanalytics/resthandler/SecureDetectorRestApiIT.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/test/java/org/opensearch/securityanalytics/resthandler/SecureDetectorRestApiIT.java b/src/test/java/org/opensearch/securityanalytics/resthandler/SecureDetectorRestApiIT.java index 2d8bd3f4d..e9ce3b9d9 100644 --- a/src/test/java/org/opensearch/securityanalytics/resthandler/SecureDetectorRestApiIT.java +++ b/src/test/java/org/opensearch/securityanalytics/resthandler/SecureDetectorRestApiIT.java @@ -363,6 +363,8 @@ public void testUpdateDetector_userDoesntHaveIndexAccess_failure() throws IOExce // Assign a role to the index createIndexRole(TEST_HR_ROLE, Collections.emptyList(), indexPermissions, List.of(index)); String[] users = {user}; + // Assign a role to existing user + createUserRolesMapping(TEST_HR_ROLE, users); // Execute CreateMappingsAction to add alias mapping for index Request createMappingRequest = new Request("POST", SecurityAnalyticsPlugin.MAPPER_BASE_URI);