Skip to content

Commit a0cfd03

Browse files
author
elasticsearchmachine
committed
[CI] Auto commit changes from spotless
1 parent 381dc70 commit a0cfd03

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

libs/entitlement/src/test/java/org/elasticsearch/entitlement/runtime/policy/FileAccessTreeTests.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -411,12 +411,11 @@ public void testDuplicateExclusivePaths() {
411411
new ExclusivePath(original.componentName(), Set.of("module2"), originalExclusivePath.path()),
412412
new ExclusivePath(original.componentName(), Set.of(original.moduleName()), normalizePath(path("/c/d")))
413413
);
414-
var iae = expectThrows(IllegalArgumentException.class,
415-
() ->
416-
buildExclusivePathList(distinctEntitlements, TEST_PATH_LOOKUP)
414+
var iae = expectThrows(IllegalArgumentException.class, () -> buildExclusivePathList(distinctEntitlements, TEST_PATH_LOOKUP));
415+
assertThat(
416+
iae.getMessage(),
417+
equalTo("Path [/a/b] is already exclusive to [component1][module1], cannot add exclusive access for [component2][module1]")
417418
);
418-
assertThat(iae.getMessage(),
419-
equalTo("Path [/a/b] is already exclusive to [component1][module1], cannot add exclusive access for [component2][module1]"));
420419

421420
var equivalentEntitlements = List.of(original, differentMode, differentPlatform);
422421
var equivalentPaths = List.of(originalExclusivePath);

libs/entitlement/src/test/java/org/elasticsearch/entitlement/runtime/policy/PolicyManagerTests.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -458,8 +458,13 @@ public void testFilesEntitlementsWithExclusive() {
458458
Set.of()
459459
)
460460
);
461-
assertThat(iae.getMessage(), equalTo("Path [/base/test] is already exclusive to [plugin1][test.module1]," +
462-
" cannot add exclusive access for [plugin2][test.module2]"));
461+
assertThat(
462+
iae.getMessage(),
463+
equalTo(
464+
"Path [/base/test] is already exclusive to [plugin1][test.module1],"
465+
+ " cannot add exclusive access for [plugin2][test.module2]"
466+
)
467+
);
463468

464469
iae = expectThrows(
465470
IllegalArgumentException.class,

0 commit comments

Comments
 (0)