From 21f74ff9e019c097341722f7855c994545691581 Mon Sep 17 00:00:00 2001 From: Swikriti Tripathi Date: Mon, 5 Sep 2022 09:52:11 +0545 Subject: [PATCH] change file name --- .drone.env | 7 +------ tests/acceptance/config/behat.yml | 2 +- ...acesTusContext.php => SpacesTUSContext.php} | 18 ++++-------------- 3 files changed, 6 insertions(+), 21 deletions(-) rename tests/acceptance/features/bootstrap/{SpacesTusContext.php => SpacesTUSContext.php} (88%) diff --git a/.drone.env b/.drone.env index 476aab69785..868270b1e56 100644 --- a/.drone.env +++ b/.drone.env @@ -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 diff --git a/tests/acceptance/config/behat.yml b/tests/acceptance/config/behat.yml index a060c34a519..8459c48e048 100644 --- a/tests/acceptance/config/behat.yml +++ b/tests/acceptance/config/behat.yml @@ -47,7 +47,7 @@ default: - TrashbinContext: - WebDavPropertiesContext: - TUSContext: - - SpacesTusContext: + - SpacesTUSContext: apiArchiver: paths: diff --git a/tests/acceptance/features/bootstrap/SpacesTusContext.php b/tests/acceptance/features/bootstrap/SpacesTUSContext.php similarity index 88% rename from tests/acceptance/features/bootstrap/SpacesTusContext.php rename to tests/acceptance/features/bootstrap/SpacesTUSContext.php index 93a5f257c65..dc610e14750 100644 --- a/tests/acceptance/features/bootstrap/SpacesTusContext.php +++ b/tests/acceptance/features/bootstrap/SpacesTUSContext.php @@ -20,7 +20,7 @@ /** * Context for the TUS-specific steps using the Graph API */ -class SpacesTusContext implements Context { +class SpacesTUSContext implements Context { /** * @var FeatureContext @@ -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; } /** @@ -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, ''); } @@ -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); } }