-
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
Add tests for getUsers #33146
Add tests for getUsers #33146
Conversation
@@ -425,9 +436,18 @@ public function theAppsReturnedByTheOccCommandShouldInclude(TableNode $appListTa | |||
public function theUsersReturnedByTheOccCommandShouldBe(TableNode $useridTable) { | |||
$lastOutput = $this->featureContext->getStdOutOfOccCommand(); | |||
$lastOutputUsers = \json_decode($lastOutput, true); | |||
$result = []; | |||
// check if an array is a multi-dimentional array with inner array key 'displayName' | |||
if (\array_column($lastOutputUsers, 'displayName')) { |
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 check is because when we run occ command to get users from a group we get a single dimensional array but when we run occ command to get all users on ownCloud server we get multi-dimensional array
@@ -425,9 +436,18 @@ public function theAppsReturnedByTheOccCommandShouldInclude(TableNode $appListTa | |||
public function theUsersReturnedByTheOccCommandShouldBe(TableNode $useridTable) { | |||
$lastOutput = $this->featureContext->getStdOutOfOccCommand(); | |||
$lastOutputUsers = \json_decode($lastOutput, true); | |||
$result = []; | |||
// check if an array is a multi-dimentional array with inner array key 'displayName' |
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.
s/dimentional/dimensional
a976333
to
834e454
Compare
Codecov Report
@@ Coverage Diff @@
## master #33146 +/- ##
=========================================
Coverage 64.12% 64.12%
Complexity 18720 18720
=========================================
Files 1184 1184
Lines 70437 70437
Branches 1270 1270
=========================================
Hits 45171 45171
Misses 24896 24896
Partials 370 370
Continue to review full report at Codecov.
|
Backport on: #33148 |
Description
This PR adds more tests for cliProvisioning getUsers using occ commands.
Related issue: #33052
How Has This Been Tested?
Locally
Types of changes
Checklist: