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 21f74ff
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 21 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 @@ -95,12 +95,8 @@ public function userHasUploadedFileViaTusInSpace(string $user, string $source, s
* @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'];
}
$this->spacesContext->setSpaceIDByName($user, $spaceName);
$this->tusContext->userUploadsUsingTusAFileTo($user, $source, $destination);
WebDavHelper::$SPACE_ID_FROM_OCIS = null;
}

/**
Expand Down Expand Up @@ -133,10 +129,7 @@ public function userHasCreatedANewTusResourceForTheSpaceUsingTheWebdavApiWithThe
* @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'];
}
$this->spacesContext->setSpaceIDByName($user, $spaceName);
$this->tusContext->createNewTUSResourceWithHeaders($user, $headers, '');
}

Expand All @@ -152,10 +145,7 @@ public function userCreatesANewTusResourceForTheSpaceUsingTheWebdavApiWithTheseH
* @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'];
}
$this->spacesContext->setSpaceIDByName($user, $spaceName);
$this->tusContext->userUploadsAFileWithContentToUsingTus($user, $content, $resource);
}
}

0 comments on commit 21f74ff

Please sign in to comment.