-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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 AttestationTestRunner and replace AttestationController #18076
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.
Please change the code as per the comments below and then re-run all the tests.
{"Microsoft.Authorization", null} | ||
} | ||
).WithManagementClients( | ||
GetResourceManagementClient, |
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 method invocation is not necessary. Please remove it
} | ||
).WithManagementClients( | ||
GetResourceManagementClient, | ||
GetAttestationManagementClient, |
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 method invocation is not necessary. Please remove it
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.
Not all tests can pass after removed any of them. Message is:
Exception calling "Invoke" with "2" argument(s): "TestManagementClientHelper class wasn't initialized with the ResourceManagementClient client."
---> System.ArgumentException : TestManagementClientHelper class wasn't initialized with the ResourceManagementClient client.
.Build(); | ||
} | ||
|
||
private static ResourceManagementClient GetResourceManagementClient(MockContext context) |
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 method definition is not necessary. Please remove it
return context.GetServiceClient<ResourceManagementClient>(TestEnvironmentFactory.GetTestEnvironment()); | ||
} | ||
|
||
private static AttestationManagementClient GetAttestationManagementClient(MockContext context) |
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 method definition is not necessary. Please remove it
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.
Without WithManagementClients will set TestClientFactory instead of the MockClientFactory which resulted the issue. May need to remove this line of code after rolling out the new testfx code.
Description
Checklist
CONTRIBUTING.md
ChangeLog.md
file(s) has been updated:ChangeLog.md
file can be found atsrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md
## Upcoming Release
header -- no new version header should be added