Add AttestationTestRunner and replace AttestationController#18076
Add AttestationTestRunner and replace AttestationController#18076vidai-msft merged 2 commits intoAzure:mainfrom
Conversation
vidai-msft
left a comment
There was a problem hiding this comment.
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.
This method invocation is not necessary. Please remove it
| } | ||
| ).WithManagementClients( | ||
| GetResourceManagementClient, | ||
| GetAttestationManagementClient, |
There was a problem hiding this comment.
This method invocation is not necessary. Please remove it
There was a problem hiding this comment.
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.
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.
This method definition is not necessary. Please remove it
vidai-msft
left a comment
There was a problem hiding this comment.
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.mdChangeLog.mdfile(s) has been updated:ChangeLog.mdfile can be found atsrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md## Upcoming Releaseheader -- no new version header should be added