Commit d8ba9f41 authored by Vincent Petry's avatar Vincent Petry Committed by GitHub
Browse files

Merge pull request #26920 from owncloud/integration-tests-fixing-alt-home

Integration tests fixing alt home
parents 8a1da1ea 6c2f3083
......@@ -299,8 +299,8 @@ trait BasicStructure {
* @param string $text
*/
public function modifyTextOfFile($user, $filename, $text) {
self::removeFile("../../data/$user/files", "$filename");
file_put_contents("../../data/$user/files" . "$filename", "$text");
self::removeFile($this->getUserHome($user) . "/files", "$filename");
file_put_contents($this->getUserHome($user) . "/files" . "$filename", "$text");
}
/**
......
......@@ -486,6 +486,9 @@ trait Provisioning {
$apps = $appList->getRows();
$appsSimplified = $this->simplifyArray($apps);
$respondedArray = $this->getArrayOfAppsResponded($this->response);
if(($key = array_search('testing', $respondedArray)) !== false) {
array_splice($respondedArray, $key, 1);
}
PHPUnit_Framework_Assert::assertEquals($appsSimplified, $respondedArray, "", 0.0, 10, true);
}
......
......@@ -130,9 +130,10 @@ Feature: federated
And User "user1" from server "REMOTE" accepts last pending share
And Using server "REMOTE"
And As an "user1"
And User "user1" modifies text of "/textfile0.txt" with text "BLABLABLA"
When User "user1" uploads file "../../data/user1/files/textfile0.txt" to "/textfile0 (2).txt"
And Downloading file "/textfile0 (2).txt" with range "bytes=0-8"
When User "user1" uploads file "data/file_to_overwrite.txt" to "/textfile0 (2).txt"
And Using server "LOCAL"
And As an "user0"
And Downloading file "/textfile0.txt" with range "bytes=0-8"
Then Downloaded content should be "BLABLABLA"
Scenario: Overwrite a federated shared folder as recipient
......@@ -145,9 +146,10 @@ Feature: federated
And User "user1" from server "REMOTE" accepts last pending share
And Using server "REMOTE"
And As an "user1"
And User "user1" modifies text of "/textfile0.txt" with text "BLABLABLA"
When User "user1" uploads file "../../data/user1/files/textfile0.txt" to "/PARENT (2)/textfile0.txt"
And Downloading file "/PARENT (2)/textfile0.txt" with range "bytes=0-8"
When User "user1" uploads file "data/file_to_overwrite.txt" to "/PARENT (2)/textfile0.txt"
And Using server "LOCAL"
And As an "user0"
And Downloading file "/PARENT/textfile0.txt" with range "bytes=0-8"
Then Downloaded content should be "BLABLABLA"
Scenario: Overwrite a federated shared file as recipient using old chunking
......
......@@ -47,7 +47,7 @@ ID_STORAGE=`echo $OUTPUT_CREATE_STORAGE | awk {'print $5'}`
$OCC files_external:option $ID_STORAGE enable_sharing true
if test "$OC_TEST_ALT_HOME" = "1"; then
env_althome_enable
env_alt_home_enable
fi
vendor/bin/behat --strict -f junit -f pretty $SCENARIO_TO_RUN
......@@ -62,7 +62,7 @@ $OCC files_external:delete -y $ID_STORAGE
$OCC app:disable files_external
if test "$OC_TEST_ALT_HOME" = "1"; then
env_althome_clear
env_alt_home_clear
fi
if [ -z $HIDE_OC_LOGS ]; then
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment