Skip to content

Commit

Permalink
Merge pull request #43399 from nextcloud/storage-directory-test-mtime…
Browse files Browse the repository at this point in the history
…-persision

make storage directory test be a bit less strict about mtimes
  • Loading branch information
icewind1991 authored Feb 7, 2024
2 parents 80c832e + 5aea3f4 commit ed3a1e7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/lib/Files/Storage/Storage.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,13 @@ public function testDirectories($directory) {
$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);

Expand Down

0 comments on commit ed3a1e7

Please sign in to comment.