-
Notifications
You must be signed in to change notification settings - Fork 3k
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
{Graph} Refine code and tests for ms graph group #21663
Conversation
Graph |
|
||
# show user's group memberships | ||
self.cmd('ad user get-member-groups --upn-or-object-id {user1_id}', | ||
checks=self.check('[0].displayName', self.kwargs['group'])) |
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.
az ad user
related tests are totally removed from GraphGroupScenarioTest
@calvinhzy for awareness
self.cmd('ad user update --display-name {user1}_new --account-enabled false --id {user1}@{domain} --mail-nickname {new_mail_nick_name}') | ||
user1_update_result = self.cmd('ad user show --upn-or-object-id {user1}@{domain}', checks=[self.check("displayName", '{user1}_new')]).get_output_in_json() | ||
self.cmd('ad user update --id {user1}@{domain} --password {pass}') | ||
self.cmd('ad user update --id {user1}@{domain} --password {pass} --force-change-password-next-login true') | ||
with self.assertRaises(CLIError): | ||
self.cmd('ad user update --id {user1}@{domain} --force-change-password-next-login false') |
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.
@calvinhzy, please make sure these removed tests are covered by user tests.
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.
Ah. I saw you have already mentioned that: #21663 (comment) 😄
Just as a side note: https://docs.microsoft.com/en-us/graph/api/group-list-members?view=graph-rest-1.0&tabs=http
This was found in #16123 (comment) Email: Microsoft Graph feature gap |
src/azure-cli/azure/cli/command_modules/role/tests/latest/test_graph.py
Outdated
Show resolved
Hide resolved
self.cmd('ad group member remove -g {leaf_group_id} --member-id {sp_id}') | ||
self.cmd('ad group member check -g {leaf_group_id} --member-id {sp_id}', | ||
checks=self.check('value', False)) | ||
with mock.patch('azure.cli.command_modules.role.custom._gen_guid', side_effect=self.create_guid): |
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 we don't need this, as we are not generating any role assignments.
Description
Similar with #21525
Refine code and tests for ms graph group
This checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.