diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2016-12-23 13:46:51 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-23 13:46:51 +0100 |
commit | bfdc55c80ac2c1c827ec2e894dbee41021fd6c2d (patch) | |
tree | 8b786d527aef0a576b08368c78ad9ad5489174d7 | |
parent | 5f1bb42c227396039650e537fb61c3bc4c17476a (diff) | |
parent | aad088f3c09e9cedc64493a3b12333330a25e9e8 (diff) | |
download | nextcloud-server-bfdc55c80ac2c1c827ec2e894dbee41021fd6c2d.tar.gz nextcloud-server-bfdc55c80ac2c1c827ec2e894dbee41021fd6c2d.zip |
Merge pull request #2841 from nextcloud/integration-tests-allowing-md5-home
Integration tests allowing md5 home
-rw-r--r-- | build/integration/features/bootstrap/BasicStructure.php | 4 | ||||
-rw-r--r-- | build/integration/features/bootstrap/Provisioning.php | 13 | ||||
-rw-r--r-- | build/integration/features/bootstrap/WebDav.php | 9 |
3 files changed, 20 insertions, 6 deletions
diff --git a/build/integration/features/bootstrap/BasicStructure.php b/build/integration/features/bootstrap/BasicStructure.php index 46647f97e85..24428b6c9d9 100644 --- a/build/integration/features/bootstrap/BasicStructure.php +++ b/build/integration/features/bootstrap/BasicStructure.php @@ -343,8 +343,8 @@ trait BasicStructure { file_put_contents("../../data/$user/files" . "$filename", "$text"); } - public function createFileSpecificSize($name, $size){ - $file = fopen("data/" . "$name", 'w'); + public function createFileSpecificSize($name, $size) { + $file = fopen("work/" . "$name", 'w'); fseek($file, $size - 1 ,SEEK_CUR); fwrite($file,'a'); // write a dummy char at SIZE position fclose($file); diff --git a/build/integration/features/bootstrap/Provisioning.php b/build/integration/features/bootstrap/Provisioning.php index dbdfafcecdc..0055ff15de0 100644 --- a/build/integration/features/bootstrap/Provisioning.php +++ b/build/integration/features/bootstrap/Provisioning.php @@ -705,6 +705,19 @@ trait Provisioning { } /** + * Returns home path of the given user + * @param string $user + */ + public function getUserHome($user) { + $fullUrl = $this->baseUrl . "v{$this->apiVersion}.php/cloud/users/$user"; + $client = new Client(); + $options = []; + $options['auth'] = $this->adminUser; + $this->response = $client->get($fullUrl, $options); + return $this->response->xml()->data[0]->home; + } + + /** * @BeforeScenario * @AfterScenario */ diff --git a/build/integration/features/bootstrap/WebDav.php b/build/integration/features/bootstrap/WebDav.php index 57ca638ec7f..680d8f96e7c 100644 --- a/build/integration/features/bootstrap/WebDav.php +++ b/build/integration/features/bootstrap/WebDav.php @@ -496,10 +496,11 @@ trait WebDav { public function userAddsAFileTo($user, $bytes, $destination){ $filename = "filespecificSize.txt"; $this->createFileSpecificSize($filename, $bytes); - PHPUnit_Framework_Assert::assertEquals(1, file_exists("data/$filename")); - $this->userUploadsAFileTo($user, "data/$filename", $destination); - $this->removeFile("data/", $filename); - PHPUnit_Framework_Assert::assertEquals(1, file_exists("../../data/$user/files$destination")); + PHPUnit_Framework_Assert::assertEquals(1, file_exists("work/$filename")); + $this->userUploadsAFileTo($user, "work/$filename", $destination); + $this->removeFile("work/", $filename); + $expectedElements = new \Behat\Gherkin\Node\TableNode([["$destination"]]); + $this->checkElementList($user, $expectedElements); } /** |