[Pkg-owncloud-commits] [owncloud] 18/67: remove ctime tests for filestorage, ctime will be removed from the storage api in the future

David Prévot taffit at alioth.debian.org
Fri Nov 8 23:10:33 UTC 2013


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to annotated tag v4.5.1
in repository owncloud.

commit 9de4eccd99e44b7300f12803eaff24d95cf7396a
Author: Robin Appelman <icewind at owncloud.com>
Date:   Thu Oct 11 21:28:36 2012 +0200

    remove ctime tests for filestorage, ctime will be removed from the storage api in the future
---
 tests/lib/filestorage.php |    9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/tests/lib/filestorage.php b/tests/lib/filestorage.php
index 8156aeb..58ac0cd 100644
--- a/tests/lib/filestorage.php
+++ b/tests/lib/filestorage.php
@@ -156,12 +156,7 @@ abstract class Test_FileStorage extends UnitTestCase {
 		$this->instance->file_put_contents('/lorem.txt', file_get_contents($textFile));
 		$this->assertTrue($this->instance->isReadable('/lorem.txt'));
 		$ctimeEnd = time();
-		$cTime = $this->instance->filectime('/lorem.txt');
 		$mTime = $this->instance->filemtime('/lorem.txt');
-		if ($cTime != -1) { //not everything can support ctime
-			$this->assertTrue(($ctimeStart - 1) <= $cTime);
-			$this->assertTrue($cTime <= ($ctimeEnd + 1));
-		}
 		$this->assertTrue($this->instance->hasUpdated('/lorem.txt', $ctimeStart - 1));
 		$this->assertTrue($this->instance->hasUpdated('/', $ctimeStart - 1));
 
@@ -170,17 +165,15 @@ abstract class Test_FileStorage extends UnitTestCase {
 		$this->assertEqual(filesize($textFile), $this->instance->filesize('/lorem.txt'));
 
 		$stat = $this->instance->stat('/lorem.txt');
-		//only size, mtime and ctime are requered in the result
+		//only size and mtime are requered in the result
 		$this->assertEqual($stat['size'], $this->instance->filesize('/lorem.txt'));
 		$this->assertEqual($stat['mtime'], $mTime);
-		$this->assertEqual($stat['ctime'], $cTime);
 
 		$mtimeStart = time();
 		$supportsTouch = $this->instance->touch('/lorem.txt');
 		$mtimeEnd = time();
 		if ($supportsTouch !== false) {
 			$originalCTime = $cTime;
-			$cTime = $this->instance->filectime('/lorem.txt');
 			$mTime = $this->instance->filemtime('/lorem.txt');
 			$this->assertTrue(($mtimeStart - 1) <= $mTime);
 			$this->assertTrue($mTime <= ($mtimeEnd + 1));

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list