Skip to content

Commit

Permalink
change file name
Browse files Browse the repository at this point in the history
  • Loading branch information
SwikritiT committed Sep 5, 2022
1 parent bc834a7 commit 404ffd1
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 25 deletions.
7 changes: 1 addition & 6 deletions .drone.env
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
# The test runner source for API tests
<<<<<<< HEAD
CORE_COMMITID=b51fb4c01f08763e023aece4f90308e07a7ac73f
CORE_COMMITID=dc32078d4c9a158f7c412c780035bc90906a8ab8
CORE_BRANCH=master
=======
CORE_COMMITID=6500d5fd867411fa0ba568b261c695f1b110266f
CORE_BRANCH=adjust-tus-code-to-reuse-on-ocis
>>>>>>> test with core branch

# The test runner source for UI tests
WEB_COMMITID=4828c892d292dbccd382104c11486bc5d21340b0
Expand Down
2 changes: 1 addition & 1 deletion tests/acceptance/config/behat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ default:
- TrashbinContext:
- WebDavPropertiesContext:
- TUSContext:
- SpacesTusContext:
- SpacesTUSContext:

apiArchiver:
paths:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
/**
* Context for the TUS-specific steps using the Graph API
*/
class SpacesTusContext implements Context {
class SpacesTUSContext implements Context {

/**
* @var FeatureContext
Expand Down Expand Up @@ -94,13 +94,15 @@ public function userHasUploadedFileViaTusInSpace(string $user, string $source, s
* @throws Exception
* @throws GuzzleException
*/
public function userUploadsAFileViaTusInsideOfTheSpaceUsingTheWebdavApi(string $user, string $source, string $destination, string $spaceName, ?array $uploadMetadata = null) {
$space = $this->spacesContext->getSpaceByName($user, $spaceName);
if (!WebDavHelper::$SPACE_ID_FROM_OCIS) {
WebDavHelper::$SPACE_ID_FROM_OCIS = $space['id'];
}
public function userUploadsAFileViaTusInsideOfTheSpaceUsingTheWebdavApi(
string $user,
string $source,
string $destination,
string $spaceName,
?array $uploadMetadata = null
): void {
$this->spacesContext->setSpaceIDByName($user, $spaceName);
$this->tusContext->userUploadsUsingTusAFileTo($user, $source, $destination);
WebDavHelper::$SPACE_ID_FROM_OCIS = null;
}

/**
Expand All @@ -115,7 +117,11 @@ public function userUploadsAFileViaTusInsideOfTheSpaceUsingTheWebdavApi(string $
* @throws Exception
* @throws GuzzleException
*/
public function userHasCreatedANewTusResourceForTheSpaceUsingTheWebdavApiWithTheseHeaders(string $user, string $spaceName, TableNode $headers):void {
public function userHasCreatedANewTusResourceForTheSpaceUsingTheWebdavApiWithTheseHeaders(
string $user,
string $spaceName,
TableNode $headers
): void {
$this->userCreatesANewTusResourceForTheSpaceUsingTheWebdavApiWithTheseHeaders($user, $spaceName, $headers);
$this->featureContext->theHTTPStatusCodeShouldBe(201, "Expected response status code should be 201");
}
Expand All @@ -132,11 +138,12 @@ public function userHasCreatedANewTusResourceForTheSpaceUsingTheWebdavApiWithThe
* @throws Exception
* @throws GuzzleException
*/
public function userCreatesANewTusResourceForTheSpaceUsingTheWebdavApiWithTheseHeaders(string $user, string $spaceName, TableNode $headers):void {
$space = $this->spacesContext->getSpaceByName($user, $spaceName);
if (!WebDavHelper::$SPACE_ID_FROM_OCIS) {
WebDavHelper::$SPACE_ID_FROM_OCIS = $space['id'];
}
public function userCreatesANewTusResourceForTheSpaceUsingTheWebdavApiWithTheseHeaders(
string $user,
string $spaceName,
TableNode $headers
): void {
$this->spacesContext->setSpaceIDByName($user, $spaceName);
$this->tusContext->createNewTUSResourceWithHeaders($user, $headers, '');
}

Expand All @@ -151,11 +158,13 @@ public function userCreatesANewTusResourceForTheSpaceUsingTheWebdavApiWithTheseH
* @return void
* @throws Exception|GuzzleException
*/
public function userUploadsAFileWithContentToViaTusInsideOfTheSpaceUsingTheWebdavApi(string $user, string $content, string $resource, string $spaceName) {
$space = $this->spacesContext->getSpaceByName($user, $spaceName);
if (!WebDavHelper::$SPACE_ID_FROM_OCIS) {
WebDavHelper::$SPACE_ID_FROM_OCIS = $space['id'];
}
public function userUploadsAFileWithContentToViaTusInsideOfTheSpaceUsingTheWebdavApi(
string $user,
string $content,
string $resource,
string $spaceName
): void {
$this->spacesContext->setSpaceIDByName($user, $spaceName);
$this->tusContext->userUploadsAFileWithContentToUsingTus($user, $content, $resource);
}
}

0 comments on commit 404ffd1

Please sign in to comment.