[tests-only][full-ci]Added scenarios for quota exceed with API (#6450)

* Added scenarios for quota exceed with API

* Review Address

* changed code

* review-address: check for space not exists

---------

Co-authored-by: Viktor Scharf <scharf.vi@gmail.com>
This commit is contained in:
Sagar Gurung
2023-06-15 11:50:38 +05:45
committed by GitHub
parent 3ce2413c80
commit 6540865d50
2 changed files with 10 additions and 0 deletions

View File

@@ -130,3 +130,12 @@ Feature: State of the quota
And user "Brian" has been created with default attributes and without skeleton files
When user "Brian" uploads file with content "more than 10 bytes content" to "lorem.txt" using the WebDAV API
Then the HTTP status code should be "507"
@env-config
Scenario: try to create a space with quota greater than OCIS spaces max quota
Given the config "OCIS_SPACES_MAX_QUOTA" has been set to "50"
And user "Brian" has been created with default attributes and without skeleton files
And the administrator has given "Brian" the role "Space Admin" using the settings api
When user "Brian" tries to create a space "new space" of type "project" with quota "51" using the Graph API
Then the HTTP status code should be "400"
And the user "Brian" should not have a space called "new space"

View File

@@ -603,6 +603,7 @@ class SpacesContext implements Context {
/**
* @When /^user "([^"]*)" creates a space "([^"]*)" of type "([^"]*)" with quota "([^"]*)" using the Graph API$/
* @When /^user "([^"]*)" tries to create a space "([^"]*)" of type "([^"]*)" with quota "([^"]*)" using the Graph API$/
*
* @param string $user
* @param string $spaceName