Skip to content

Commit e36364f

Browse files
committed
update tests
1 parent a283e0d commit e36364f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,20 +238,22 @@ public void testBasicExclusiveAccess() {
238238
assertThat(tree.canWrite(path("foo/bar")), is(false));
239239
tree = accessTree(
240240
entitlement("foo", "read", "foo.xml", "read", "foo/bar.xml", "read_write"),
241-
exclusivePaths("test-component", "diff-module", "foo/bar")
241+
exclusivePaths("test-component", "diff-module", "foo/bar", "foo/baz", "other")
242242
);
243243
assertThat(tree.canRead(path("foo")), is(true));
244244
assertThat(tree.canWrite(path("foo")), is(false));
245245
assertThat(tree.canRead(path("foo.xml")), is(true));
246246
assertThat(tree.canWrite(path("foo.xml")), is(false));
247-
assertThat(tree.canRead(path("foo/baz")), is(true));
247+
assertThat(tree.canRead(path("foo/baz")), is(false));
248248
assertThat(tree.canWrite(path("foo/baz")), is(false));
249249
assertThat(tree.canRead(path("foo/bar")), is(false));
250250
assertThat(tree.canWrite(path("foo/bar")), is(false));
251251
assertThat(tree.canRead(path("foo/bar.xml")), is(true));
252252
assertThat(tree.canWrite(path("foo/bar.xml")), is(true));
253253
assertThat(tree.canRead(path("foo/bar.baz")), is(true));
254254
assertThat(tree.canWrite(path("foo/bar.baz")), is(false));
255+
assertThat(tree.canRead(path("foo/biz/bar.xml")), is(true));
256+
assertThat(tree.canWrite(path("foo/biz/bar.xml")), is(false));
255257
}
256258

257259
public void testInvalidExclusiveAccess() {

0 commit comments

Comments
 (0)