Skip to content

[test-only] ApiTest. get users of members of several groups - #5575

Merged
v-scharf merged 2 commits into
masterfrom
getUserWithFilterByGroup
Feb 16, 2023
Merged

v-scharf merged 2 commits into
masterfrom
getUserWithFilterByGroup

Conversation

@v-scharf

Copy link
Copy Markdown
Contributor
  • admin user gets all users of certain groups using filter https://localhost:9200/graph/v1.0/users?$filter=memberOf/any(m:m/id eq 'group1UUID') and memberOf/any(m:m/id eq 'group2UUID')

@update-docs

update-docs Bot commented Feb 14, 2023

Copy link
Copy Markdown

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@ownclouders

ownclouders commented Feb 14, 2023 •

Copy link
Copy Markdown
Contributor

💥 Acceptance test wopiValidatorTests-ocis failed. Further test are cancelled...

Comment thread tests/TestHelpers/GraphHelper.php Resolved

@SagarGi SagarGi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code LGTM 👍 if CI is happy

@individual-it individual-it left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This filters are so complex, we might also want to have some low level tests, just to be able to send e.g. invalid data etc.
But that is not for this PR

"code" => "%user_id%",
"function" =>
[$this, "getUserIdByUserName"],
[$this->graphContext, "getUserIdByUserName"],

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get error here: Fatal error: Typed property GraphContext::$featureContext must not be accessed before initialization (Behat\Testwork\Call\Exception\FatalThrowableError)
I don't understand what I need do. do you have ideas?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the issue is that in getUserIdByUserName you are trying to access featureContext, but that is only initiated in the before() function of graphContext, that might not have happened at that point

@v-scharf
v-scharf force-pushed the getUserWithFilterByGroup branch from fba5292 to d494ba7 Compare February 16, 2023 11:23
@sonarqubecloud

Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@v-scharf
v-scharf merged commit 3e3d3f9 into master Feb 16, 2023
@delete-merged-branch
delete-merged-branch Bot deleted the getUserWithFilterByGroup branch February 16, 2023 15:34
ownclouders pushed a commit that referenced this pull request Feb 16, 2023
Author: Viktor Scharf <[email protected]>
Date:   Thu Feb 16 16:34:13 2023 +0100

    [test-only] ApiTest. get users of members of several groups  (#5575)

    * get users with group filter

    * fix test
ownclouders pushed a commit that referenced this pull request Feb 17, 2023
Author: Viktor Scharf <[email protected]>
Date:   Thu Feb 16 16:34:13 2023 +0100

    [test-only] ApiTest. get users of members of several groups  (#5575)

    * get users with group filter

    * fix test
v-scharf added a commit that referenced this pull request Feb 27, 2023
saw-jan pushed a commit that referenced this pull request Feb 28, 2023
@saw-jan saw-jan mentioned this pull request Feb 28, 2023
2 of 9 tasks
saw-jan pushed a commit that referenced this pull request Feb 28, 2023
grgprarup pushed a commit that referenced this pull request Mar 2, 2023
grgprarup pushed a commit that referenced this pull request Mar 3, 2023
phil-davis pushed a commit that referenced this pull request Mar 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants