Skip to content

Commit

Permalink
Drone
Browse files Browse the repository at this point in the history
  • Loading branch information
amrita-shrestha committed Jul 24, 2023
1 parent b94ceba commit 26cdad9
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 3 deletions.
1 change: 1 addition & 0 deletions .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ config = {
"apiSpacesShares",
"apiCors",
"apiAsyncUpload",
"apiDownloads",
],
"skip": False,
},
Expand Down
21 changes: 20 additions & 1 deletion tests/acceptance/config/behat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ default:
- SpacesTUSContext:
- GraphContext:
- OcisConfigContext:
- ArchiverContext:

apiSpacesShares:
paths:
Expand Down Expand Up @@ -211,6 +210,26 @@ default:
- OcisConfigContext:
- PublicWebDavContext:

apiDownloads:
paths:
- '%paths.base%/../features/apiDownloads'
context: *common_ldap_suite_context
contexts:
- NotificationContext:
- SpacesContext:
- FeatureContext: *common_feature_context_params
- WebDavPropertiesContext:
- OCSContext:
- GraphContext:
- TrashbinContext:
- FavoritesContext:
- ChecksumContext:
- FilesVersionsContext:
- SettingsContext:
- OcisConfigContext:
- PublicWebDavContext:
- ArchiverContext:

extensions:
rdx\behatvars\BehatVariablesExtension: ~

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Feature: Download space
| viewer |


Scenario Outline: admin and space admin tries to downloads other user space
Scenario Outline: admin and space admin try to download a space that they do not have access to
Given the administrator has assigned the role "<userRole>" to user "Brian" using the Graph API
When user "Brian" tries to download the space "Project-space" owned by user "Alice" using the WebDAV API
Then the HTTP status code should be "404"
Expand Down
2 changes: 1 addition & 1 deletion tests/acceptance/features/bootstrap/SpacesContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -3254,7 +3254,7 @@ public function theUserShouldHaveSpaceWithRecipient(
* @throws GuzzleException
*/
public function userDownloadsTheSpaceUsingTheWebdavApi(string $user, string $spaceName, string $owner = ''):void {
$space = $this->getSpaceByName(($owner !== '') ? $owner : $user, $spaceName);
$space = $this->getSpaceByName($owner ?? $user, $spaceName);
$url = $this->featureContext->getBaseUrl() . '/archiver?id=' . $space['id'];
$this->featureContext->setResponse(
HttpRequestHelper::get(
Expand Down

0 comments on commit 26cdad9

Please sign in to comment.