Skip to content

Commit dcdc6c0

Browse files
tulinkryVladimir Kotal
authored andcommitted
assume setReadable for the tests
1 parent d1e826f commit dcdc6c0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

opengrok-indexer/src/test/java/org/opengrok/indexer/web/PageConfigTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
import java.util.Map;
3434
import javax.servlet.http.HttpServletRequest;
3535
import org.junit.AfterClass;
36+
import org.junit.Assume;
3637
import org.junit.BeforeClass;
3738
import org.junit.Rule;
3839
import org.junit.Test;
@@ -485,7 +486,8 @@ public void testCheckSourceRootExistence4() throws IOException {
485486
File temp = File.createTempFile("opengrok", "-test-file.tmp");
486487
Files.delete(temp.toPath());
487488
Files.createDirectories(temp.toPath());
488-
temp.setReadable(false);
489+
// skip the test if the implementation does not permit setting permissions
490+
Assume.assumeTrue(temp.setReadable(false));
489491
RuntimeEnvironment.getInstance().setSourceRoot(temp.getAbsolutePath());
490492
try {
491493
cfg.checkSourceRootExistence();

0 commit comments

Comments
 (0)