aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2024-02-06 17:44:23 +0100
committerRobin Appelman <robin@icewind.nl>2024-02-07 12:13:00 +0100
commit5aea3f4d76aa4d7e4105bb8f6d7c9a9a475ac04c (patch)
treea36a005bcb3d5d14ff28edea101f508579e72448 /tests
parent4ce10d05de059e6a153d6bb8ad7f71fb05d00e1e (diff)
downloadnextcloud-server-5aea3f4d76aa4d7e4105bb8f6d7c9a9a475ac04c.tar.gz
nextcloud-server-5aea3f4d76aa4d7e4105bb8f6d7c9a9a475ac04c.zip
make storage directory test be a bit less strict about mtimes
sometimes the clock ticks over during the test Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/Files/Storage/Storage.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/lib/Files/Storage/Storage.php b/tests/lib/Files/Storage/Storage.php
index a646fd5fd0b..63b3dfc5a98 100644
--- a/tests/lib/Files/Storage/Storage.php
+++ b/tests/lib/Files/Storage/Storage.php
@@ -94,12 +94,13 @@ abstract class Storage extends \Test\TestCase {
$dirEntry = $content[0];
unset($dirEntry['scan_permissions']);
unset($dirEntry['etag']);
+ $this->assertLessThanOrEqual(1, abs($dirEntry['mtime'] - $this->instance->filemtime($directory)));
+ unset($dirEntry['mtime']);
+ unset($dirEntry['storage_mtime']);
$this->assertEquals([
'name' => $directory,
'mimetype' => $this->instance->getMimeType($directory),
- 'mtime' => $this->instance->filemtime($directory),
'size' => -1,
- 'storage_mtime' => $this->instance->filemtime($directory),
'permissions' => $this->instance->getPermissions($directory),
], $dirEntry);