File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
libs/entitlement/qa/entitlement-test-plugin/src/main/java/org/elasticsearch/entitlement/qa/test Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 10
10
package org .elasticsearch .entitlement .qa .test ;
11
11
12
12
import org .elasticsearch .entitlement .qa .entitled .EntitledActions ;
13
- import org .elasticsearch .entitlement .runtime .policy .PolicyManager ;
13
+ import org .elasticsearch .entitlement .runtime .policy .PolicyChecker ;
14
14
15
15
import java .io .IOException ;
16
16
import java .nio .file .FileSystems ;
19
19
import java .nio .file .Path ;
20
20
import java .nio .file .WatchEvent ;
21
21
import java .util .Arrays ;
22
+ import java .util .Objects ;
22
23
23
24
import static org .elasticsearch .entitlement .qa .test .EntitlementTest .ExpectedAccess .ALWAYS_DENIED ;
24
25
import static org .elasticsearch .entitlement .qa .test .EntitlementTest .ExpectedAccess .PLUGINS ;
@@ -37,7 +38,7 @@ static void checkToRealPathForInvalidTarget() throws IOException {
37
38
try {
38
39
EntitledActions .pathToRealPath (invalidLink ); // throws NoSuchFileException when checking entitlements due to invalid target
39
40
} catch (NoSuchFileException e ) {
40
- assert Arrays .stream (e .getStackTrace ()).anyMatch (t -> t . getClassName (). equals ( PolicyManager . class .getName ()))
41
+ assert Arrays .stream (e .getStackTrace ()).anyMatch (t -> Objects . equals ( t . getModuleName (), PolicyChecker . class . getModule () .getName ()))
41
42
: "Expected NoSuchFileException to be thrown by entitlements check" ;
42
43
throw e ;
43
44
}
You can’t perform that action at this time.
0 commit comments