Skip to content

Commit

Permalink
Merge pull request #39828 from owncloud/then-steps-in-apiMain
Browse files Browse the repository at this point in the history
[tests-only][full-ci]added then steps for apiMain suite
  • Loading branch information
kiranparajuli589 authored Feb 28, 2022
2 parents 554186c + 72c072f commit 8280751
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ Feature: checksums
And using new DAV path
And user "Brian" has been created with default attributes and without skeleton files
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/myChecksumFile.txt" with checksum "MD5:d70b40f177b14b470d1756a3c12b963a"
When user "Alice" shares file "/myChecksumFile.txt" with user "Brian" using the sharing API
And user "Brian" accepts share "/myChecksumFile.txt" offered by user "Alice" using the sharing API
And user "Brian" uploads file with checksum "SHA1:ce5582148c6f0c1282335b87df5ed4be4b781399" and content "Some Text" to "/Shares/myChecksumFile.txt" using the WebDAV API
And user "Brian" requests the checksum of "/Shares/myChecksumFile.txt" via propfind
Then the webdav checksum should be empty
And user "Alice" has shared file "/myChecksumFile.txt" with user "Brian"
And user "Brian" has accepted share "/myChecksumFile.txt" offered by user "Alice"
And user "Brian" has uploaded file with checksum "SHA1:ce5582148c6f0c1282335b87df5ed4be4b781399" and content "Some Text" to "/Shares/myChecksumFile.txt"
When user "Brian" requests the checksum of "/Shares/myChecksumFile.txt" via propfind
Then the HTTP status code should be "207"
And the webdav checksum should be empty
6 changes: 4 additions & 2 deletions tests/acceptance/features/apiMain/external-storage.feature
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ Feature: external-storage
| Brian |
And user "Alice" has created folder "/local_storage/foo1"
When user "Alice" moves file "/textfile0.txt" to "/local_storage/foo1/textfile0.txt" using the WebDAV API
Then as "Brian" file "/local_storage/foo1/textfile0.txt" should exist
Then the HTTP status code should be "201"
And as "Brian" file "/local_storage/foo1/textfile0.txt" should exist
And as "Alice" file "/local_storage/foo1/textfile0.txt" should exist

Scenario: Move a file out of storage
Expand All @@ -42,7 +43,8 @@ Feature: external-storage
And user "Alice" has created folder "/local_storage/foo2"
And user "Alice" has moved file "/textfile0.txt" to "/local_storage/foo2/textfile0.txt"
When user "Brian" moves file "/local_storage/foo2/textfile0.txt" to "/local.txt" using the WebDAV API
Then as "Brian" file "/local_storage/foo2/textfile0.txt" should not exist
Then the HTTP status code should be "201"
And as "Brian" file "/local_storage/foo2/textfile0.txt" should not exist
And as "Alice" file "/local_storage/foo2/textfile0.txt" should not exist
And as "Brian" file "/local.txt" should exist

Expand Down
2 changes: 2 additions & 0 deletions tests/acceptance/features/bootstrap/Sharing.php
Original file line number Diff line number Diff line change
Expand Up @@ -1388,6 +1388,7 @@ public function userSharesFileWithUserUsingTheSharingApi(
$user2,
$permissions
);
$this->pushToLastStatusCodesArrays();
}

/**
Expand Down Expand Up @@ -2977,6 +2978,7 @@ public function userReactsToShareOfferedBy(string $user, string $action, string
$url,
null
);
$this->pushToLastStatusCodesArrays();
}

/**
Expand Down
1 change: 1 addition & 0 deletions tests/acceptance/features/bootstrap/WebDav.php
Original file line number Diff line number Diff line change
Expand Up @@ -3252,6 +3252,7 @@ public function userUploadsAFileWithChecksumAndContentTo(
$content
);
$this->lastUploadDeleteTime = \time();
$this->pushToLastStatusCodesArrays();
}

/**
Expand Down

0 comments on commit 8280751

Please sign in to comment.