-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API test for addUser #31315
API test for addUser #31315
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comments
@@ -1225,6 +1225,7 @@ public function appShouldBeEnabled($app) { | |||
|
|||
/** | |||
* @Then /^user "([^"]*)" should be disabled$/ | |||
* @When /^the user "([^"]*)" has been disabled$/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually this step is not an action, it is a test of the system state.
So we cannot write it as a When
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that does make sense. I will create a new function for it.
Scenario: Create an existing disabled user | ||
Given user "brand-new-user" has been created | ||
When user "admin" sends HTTP method "PUT" to API endpoint "/cloud/users/brand-new-user/disable" | ||
And the user "brand-new-user" has been disabled |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For these 2 steps together, we should write a step:
Given user "brand-new-user" has been disabled
and it should disable the user, and also check that the user is disabled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I should do that
Codecov Report
@@ Coverage Diff @@
## master #31315 +/- ##
=========================================
Coverage 62.59% 62.59%
Complexity 18227 18227
=========================================
Files 1145 1145
Lines 68414 68414
Branches 1234 1234
=========================================
Hits 42821 42821
Misses 25232 25232
Partials 361 361
Continue to review full report at Codecov.
|
d769d63
to
789a09a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comments
Given group "newgroup" has been created | ||
When the administrator sends a user creation request for user "newuser" password "456firstpwd" group "newgroup" using the API | ||
Then the OCS status code should be "100" | ||
And the HTTP status code should be "200" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is surprising. For v2 I expect the HTTP status code to be "400" or similar.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't get me started - need to have better / proper api design to move forward in the future
@@ -22,18 +22,10 @@ So that I can more easily manage access to resources by groups rather than indiv | |||
| Finance (NP) | Space and brackets | | |||
| Admin&Finance | Ampersand | | |||
| admin:Pokhara@Nepal | Colon and @ | | |||
| maintenance#123 | Hash sign | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The names with "#" and "%" will work after #31322 is merged. So you can rebase again after that, and remove these addGroup.feature
changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#31322 is merged now. So you can rebase and take out the addGroup changes.
3d2f1b4
to
1545b81
Compare
1545b81
to
322e7eb
Compare
Backport on #31326 |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description
API test to add user in ownCloud server
Related Issue
#31533
How Has This Been Tested?
Locally
Types of changes
Checklist: