Skip to content

Commit dd044c4

Browse files
committed
fix test
1 parent 1536fb2 commit dd044c4

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

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

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -217,25 +217,6 @@ public void testNormalizeDirectorySeparatorWindows() {
217217
assertThat(tree.canRead(Path.of("C:\\a\\c\\foo.txt")), is(true));
218218
}
219219

220-
public void testNormalizeDirectorySeparatorPosix() {
221-
assumeFalse("normalization of posix paths", Platform.WINDOWS.isCurrent());
222-
223-
assertThat(FileAccessTree.normalizePath(Path.of("\\a\\b")), equalTo("/a/b"));
224-
assertThat(FileAccessTree.normalizePath(Path.of("/a.xml")), equalTo("/a.xml"));
225-
assertThat(FileAccessTree.normalizePath(Path.of("/a/c\\foo.txt")), equalTo("/a/c/foo.txt"));
226-
227-
var tree = accessTree(entitlement("\\a\\b", "read", "/a.xml", "read", "/a/b.txt", "read", "/a/c\\foo.txt", "read"), List.of());
228-
229-
assertThat(tree.canRead(Path.of("/a.xml")), is(true));
230-
assertThat(tree.canRead(Path.of("\\a.xml")), is(true));
231-
assertThat(tree.canRead(Path.of("/a/")), is(false));
232-
assertThat(tree.canRead(Path.of("/a/b.txt")), is(true));
233-
assertThat(tree.canRead(Path.of("/a/b/c.txt")), is(true));
234-
assertThat(tree.canRead(Path.of("\\a\\b\\c.txt")), is(true));
235-
assertThat(tree.canRead(Path.of("\\a\\c\\")), is(false));
236-
assertThat(tree.canRead(Path.of("\\a\\c\\foo.txt")), is(true));
237-
}
238-
239220
public void testNormalizeTrailingSlashes() {
240221
var tree = accessTree(entitlement("/trailing/slash/", "read", "/no/trailing/slash", "read"), List.of());
241222
assertThat(tree.canRead(path("/trailing/slash")), is(true));

0 commit comments

Comments
 (0)