[Filesystem] Skip tests on readable file when run with root user
This commit is contained in:
parent
ed8dd86e20
commit
ad500e74ec
@ -50,6 +50,10 @@ class FilesystemTest extends FilesystemTestCase
|
||||
$this->markTestSkipped('This test cannot run on Windows.');
|
||||
}
|
||||
|
||||
if (!getenv('USER') || 'root' === getenv('USER')) {
|
||||
$this->markTestSkipped('This test will fail if run under superuser');
|
||||
}
|
||||
|
||||
$sourceFilePath = $this->workspace.\DIRECTORY_SEPARATOR.'copy_source_file';
|
||||
$targetFilePath = $this->workspace.\DIRECTORY_SEPARATOR.'copy_target_file';
|
||||
|
||||
@ -124,6 +128,10 @@ class FilesystemTest extends FilesystemTestCase
|
||||
$this->markTestSkipped('This test cannot run on Windows.');
|
||||
}
|
||||
|
||||
if (!getenv('USER') || 'root' === getenv('USER')) {
|
||||
$this->markTestSkipped('This test will fail if run under superuser');
|
||||
}
|
||||
|
||||
$sourceFilePath = $this->workspace.\DIRECTORY_SEPARATOR.'copy_source_file';
|
||||
$targetFilePath = $this->workspace.\DIRECTORY_SEPARATOR.'copy_target_file';
|
||||
|
||||
|
@ -49,6 +49,10 @@ class LockHandlerTest extends TestCase
|
||||
$this->markTestSkipped('This test cannot run on Windows.');
|
||||
}
|
||||
|
||||
if (!getenv('USER') || 'root' === getenv('USER')) {
|
||||
$this->markTestSkipped('This test will fail if run under superuser');
|
||||
}
|
||||
|
||||
$lockPath = sys_get_temp_dir().'/'.uniqid('', true);
|
||||
$e = null;
|
||||
$wrongMessage = null;
|
||||
|
Reference in New Issue
Block a user