Skip to content

Commit

Permalink
Skip this test if CI environment has weird perms
Browse files Browse the repository at this point in the history
  • Loading branch information
paragonie-security committed Apr 18, 2021
1 parent 68531b9 commit b6fd5bd
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions test/unit/StreamTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,10 @@ public function testUnreadableFile()
file_put_contents($filename, $buf);
chmod($filename, 0000);
$perms = fileperms($filename);
if (!is_int($perms) || ($perms & 0777) !== 0) {
if (!is_int($perms) || ($perms & 0777) !== 0 || is_readable($filename)) {
$this->markTestSkipped('chmod failed to remove read access, so the test will fail; skipping');
return;
}
var_dump($perms);
$this->markTestSkipped('This is broken in CI; why?!');
return;

try {
new ReadOnlyFile($filename);
Expand Down

0 comments on commit b6fd5bd

Please sign in to comment.