Skip to content

Commit

Permalink
Update test
Browse files Browse the repository at this point in the history
Signed-off-by: Craig Perkins <[email protected]>
  • Loading branch information
cwperks authored and dlin2028 committed May 1, 2024
1 parent e595452 commit e1a5b3f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@ public void setup() {
null,
restApiAdminPrivilegesEvaluator,
null,
Settings.EMPTY,
null
Settings.EMPTY
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,7 @@ public void accessHandlerForDefaultSettings() {
final var securityConfigApiAction = new SecurityConfigApiAction(
clusterService,
threadPool,
new SecurityApiDependencies(
null,
configurationRepository,
null,
null,
restApiAdminPrivilegesEvaluator,
null,
Settings.EMPTY,
null
)
new SecurityApiDependencies(null, configurationRepository, null, null, restApiAdminPrivilegesEvaluator, null, Settings.EMPTY)
);
assertTrue(securityConfigApiAction.accessHandler(FakeRestRequest.builder().withMethod(RestRequest.Method.GET).build()));
assertFalse(securityConfigApiAction.accessHandler(FakeRestRequest.builder().withMethod(RestRequest.Method.PUT).build()));
Expand All @@ -58,8 +49,7 @@ public void accessHandlerForUnsupportedSetting() {
null,
restApiAdminPrivilegesEvaluator,
null,
Settings.builder().put(SECURITY_UNSUPPORTED_RESTAPI_ALLOW_SECURITYCONFIG_MODIFICATION, true).build(),
null
Settings.builder().put(SECURITY_UNSUPPORTED_RESTAPI_ALLOW_SECURITYCONFIG_MODIFICATION, true).build()
)
);
assertTrue(securityConfigApiAction.accessHandler(FakeRestRequest.builder().withMethod(RestRequest.Method.GET).build()));
Expand All @@ -80,8 +70,7 @@ public void accessHandlerForRestAdmin() {
null,
restApiAdminPrivilegesEvaluator,
null,
Settings.builder().put(SECURITY_RESTAPI_ADMIN_ENABLED, true).build(),
null
Settings.builder().put(SECURITY_RESTAPI_ADMIN_ENABLED, true).build()
)
);
assertTrue(securityConfigApiAction.accessHandler(FakeRestRequest.builder().withMethod(RestRequest.Method.GET).build()));
Expand Down

0 comments on commit e1a5b3f

Please sign in to comment.