@@ -136,7 +136,7 @@ public void testPathAndFileWithSamePrefix() {
136136 }
137137
138138 public void testReadWithRelativePath () {
139- for (var dir : List .of ("config" , " home" )) {
139+ for (var dir : List .of ("home" )) {
140140 var tree = accessTree (entitlement (Map .of ("relative_path" , "foo" , "mode" , "read" , "relative_to" , dir )), List .of ());
141141 assertThat (tree .canRead (path ("foo" )), is (false ));
142142
@@ -153,7 +153,7 @@ public void testReadWithRelativePath() {
153153 }
154154
155155 public void testWriteWithRelativePath () {
156- for (var dir : List .of ("config" , " home" )) {
156+ for (var dir : List .of ("home" )) {
157157 var tree = accessTree (entitlement (Map .of ("relative_path" , "foo" , "mode" , "read_write" , "relative_to" , dir )), List .of ());
158158 assertThat (tree .canWrite (path ("/" + dir + "/foo" )), is (true ));
159159 assertThat (tree .canWrite (path ("/" + dir + "/foo/subdir" )), is (true ));
@@ -289,6 +289,12 @@ public void testTempDirAccess() {
289289 assertThat (tree .canWrite (TEST_PATH_LOOKUP .tempDir ()), is (true ));
290290 }
291291
292+ public void testConfigDirAccess () {
293+ var tree = FileAccessTree .of ("test-component" , "test-module" , FilesEntitlement .EMPTY , TEST_PATH_LOOKUP , List .of ());
294+ assertThat (tree .canRead (TEST_PATH_LOOKUP .configDir ()), is (true ));
295+ assertThat (tree .canWrite (TEST_PATH_LOOKUP .configDir ()), is (false ));
296+ }
297+
292298 public void testBasicExclusiveAccess () {
293299 var tree = accessTree (entitlement ("foo" , "read" ), exclusivePaths ("test-component" , "test-module" , "foo" ));
294300 assertThat (tree .canRead (path ("foo" )), is (true ));
0 commit comments