mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-05-24 08:27:27 -04:00
remove the test for the tus-upload
Signed-off-by: nabim777 <nabinalemagar019@gmail.com>
This commit is contained in:
@@ -95,25 +95,6 @@ class SpacesTUSContext implements Context {
|
||||
$this->featureContext->setLastUploadDeleteTime(\time());
|
||||
}
|
||||
|
||||
/**
|
||||
* @When the public uploads file :source to :destination via TUS inside last link shared folder with password :password using the WebDAV API
|
||||
*
|
||||
* @param string $source
|
||||
* @param string $destination
|
||||
* @param string $password
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
public function thePublicUploadsFileViaTusInsideLastSharedFolderWithPasswordUsingTheWebdavApi(
|
||||
string $source,
|
||||
string $destination,
|
||||
string $password
|
||||
): void {
|
||||
$this->tusContext->publicUploadFileUsingTus($source, $destination, $password);
|
||||
$this->featureContext->setLastUploadDeleteTime(\time());
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given user :user has created a new TUS resource in the space :spaceName with the following headers:
|
||||
*
|
||||
|
||||
@@ -344,43 +344,6 @@ class TUSContext implements Context {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $source
|
||||
* @param string $destination
|
||||
* @param string $password
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function publicUploadFileUsingTus(
|
||||
string $source,
|
||||
string $destination,
|
||||
string $password,
|
||||
): void {
|
||||
$password = $this->featureContext->getActualPassword($password);
|
||||
if ($this->featureContext->isUsingSharingNG()) {
|
||||
$token = $this->featureContext->shareNgGetLastCreatedLinkShareToken();
|
||||
} else {
|
||||
$token = $this->featureContext->getLastCreatedPublicShareToken();
|
||||
}
|
||||
$headers = [
|
||||
'Authorization' => 'Basic ' . \base64_encode("public" . ':' . $password),
|
||||
];
|
||||
$sourceFile = $this->featureContext->acceptanceTestsDirLocation() . $source;
|
||||
$url = WebdavHelper::getDavPath(WebDavHelper::DAV_VERSION_SPACES, $token, "public-files");
|
||||
|
||||
$client = new Client(
|
||||
$this->featureContext->getBaseUrl(),
|
||||
[
|
||||
'verify' => false,
|
||||
'headers' => $headers
|
||||
]
|
||||
);
|
||||
|
||||
$client->setApiPath($url);
|
||||
$client->setKey((string)rand())->file($sourceFile, $destination);
|
||||
$client->file($sourceFile, $destination)->createWithUpload("", 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user uploads file with content :content to :destination using the TUS protocol on the WebDAV API
|
||||
*
|
||||
|
||||
@@ -196,11 +196,8 @@
|
||||
- [apiSpaces/publicLink.feature:34](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/publicLink.feature#L34)
|
||||
- [apiSpaces/publicLink.feature:40](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/publicLink.feature#L40)
|
||||
- [apiSpaces/uploadSpaces.feature:98](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/uploadSpaces.feature#L98)
|
||||
- [apiSpaces/uploadSpaces.feature:114](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/uploadSpaces.feature#L114)
|
||||
- [apiSpaces/uploadSpaces.feature:130](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/uploadSpaces.feature#L130)
|
||||
- [apiSpacesShares/shareUploadTUS.feature:407](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/shareUploadTUS.feature#L407)
|
||||
- [apiSpacesShares/shareUploadTUS.feature:422](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/shareUploadTUS.feature#L422)
|
||||
- [apiSpacesShares/shareUploadTUS.feature:439](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/shareUploadTUS.feature#L439)
|
||||
- [apiSpaces/uploadSpaces.feature:115](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/uploadSpaces.feature#L115)
|
||||
- [apiSpaces/uploadSpaces.feature:132](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/uploadSpaces.feature#L132)
|
||||
- [apiSpacesShares/shareSpacesViaLink.feature:61](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/shareSpacesViaLink.feature#L61)
|
||||
- [apiDepthInfinity/propfind.feature:74](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiDepthInfinity/propfind.feature#L74)
|
||||
- [apiDepthInfinity/propfind.feature:124](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiDepthInfinity/propfind.feature#L124)
|
||||
|
||||
@@ -109,6 +109,7 @@ Feature: Upload files into a space
|
||||
| textfile.txt |
|
||||
And for user "Alice" folder "uploadFolder" of the space "Personal" should not contain these files:
|
||||
| textfile (1).txt |
|
||||
| textfile (2).txt |
|
||||
|
||||
@issue-10331 @issue-10469
|
||||
Scenario: public uploads a zero byte file to a public share folder inside project space
|
||||
@@ -125,6 +126,7 @@ Feature: Upload files into a space
|
||||
| textfile.txt |
|
||||
And for user "Alice" folder "uploadFolder" of the space "Project Ceres" should not contain these files:
|
||||
| textfile (1).txt |
|
||||
| textfile (2).txt |
|
||||
|
||||
@issue-10331 @issue-10469
|
||||
Scenario: public uploads a zero byte file to a public share project space
|
||||
@@ -139,3 +141,4 @@ Feature: Upload files into a space
|
||||
| textfile.txt |
|
||||
And for user "Alice" the space "Project Ceres" should not contain these files:
|
||||
| textfile (1).txt |
|
||||
| textfile (2).txt |
|
||||
|
||||
@@ -402,50 +402,3 @@ Feature: upload resources on share using TUS protocol
|
||||
| Tus-Resumable | 1.0.0 |
|
||||
Then the HTTP status code should be "460"
|
||||
And for user "Alice" the content of the file "/textFile.txt" of the space "Personal" should be "original content"
|
||||
|
||||
@issue-10331 @issue-10469
|
||||
Scenario: public uploads a zero byte file to a public share folder
|
||||
Given using SharingNG
|
||||
And user "Alice" has created folder "/uploadFolder"
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | uploadFolder |
|
||||
| space | Personal |
|
||||
| permissionsRole | createOnly |
|
||||
| password | %public% |
|
||||
When the public uploads file "filesForUpload/zerobyte.txt" to "textfile.txt" via TUS inside last link shared folder with password "%public%" using the WebDAV API
|
||||
And for user "Alice" folder "uploadFolder" of the space "Personal" should contain these files:
|
||||
| textfile.txt |
|
||||
And for user "Alice" folder "uploadFolder" of the space "Personal" should not contain these files:
|
||||
| textfile (1).txt |
|
||||
|
||||
@issue-10331 @issue-10469
|
||||
Scenario: public uploads a zero-byte file to a shared folder inside project space
|
||||
Given using SharingNG
|
||||
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
|
||||
And user "Alice" has created a space "Project" with the default quota using the Graph API
|
||||
And user "Alice" has created a folder "/uploadFolder" in space "Project"
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | uploadFolder |
|
||||
| space | Project |
|
||||
| permissionsRole | createOnly |
|
||||
| password | %public% |
|
||||
When the public uploads file "filesForUpload/zerobyte.txt" to "textfile.txt" via TUS inside last link shared folder with password "%public%" using the WebDAV API
|
||||
And for user "Alice" folder "uploadFolder" of the space "Project" should contain these files:
|
||||
| textfile.txt |
|
||||
And for user "Alice" folder "uploadFolder" of the space "Project" should not contain these files:
|
||||
| textfile (1).txt |
|
||||
|
||||
@issue-10331 @issue-10469
|
||||
Scenario: public uploads a zero-byte file to a public share project space
|
||||
Given using SharingNG
|
||||
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
|
||||
And user "Alice" has created a space "Project" with the default quota using the Graph API
|
||||
And user "Alice" has created the following space link share:
|
||||
| space | Project |
|
||||
| permissionsRole | createOnly |
|
||||
| password | %public% |
|
||||
When the public uploads file "filesForUpload/zerobyte.txt" to "textfile.txt" via TUS inside last link shared folder with password "%public%" using the WebDAV API
|
||||
Then for user "Alice" the space "Project" should contain these files:
|
||||
| textfile.txt |
|
||||
And for user "Alice" the space "Project" should not contain these files:
|
||||
| textfile (1).txt |
|
||||
|
||||
Reference in New Issue
Block a user