Skip to content

Add AksTestRunner and replace TestController #17962

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

Merged
merged 3 commits into from
Apr 27, 2022

Conversation

ziyuezh576
Copy link
Contributor

Description

Checklist

  • I have read the Submitting Changes section of CONTRIBUTING.md
  • The title of the PR is clear and informative
  • The appropriate ChangeLog.md file(s) has been updated:
    • For any service, the ChangeLog.md file can be found at src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md
    • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header -- no new version header should be added
  • The PR does not introduce breaking changes
  • If applicable, the changes made in the PR have proper test coverage
  • For public API changes to cmdlets:
    • a cmdlet design review was approved for the changes in this repository (Microsoft internal only)
      • {Please put the link here}
    • the markdown help files have been regenerated using the commands listed here

@ziyuezh576 ziyuezh576 added the Test Infra Test framework label Apr 22, 2022
@ziyuezh576 ziyuezh576 requested a review from vidai-msft April 22, 2022 08:38
Copy link
Contributor

@vidai-msft vidai-msft left a comment

Choose a reason for hiding this comment

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

Please check the review comments and change the code accordingly.

.WithNewRmModules (helper => new[]
{
helper.RMProfileModule,
helper.GetRMModulePath("AzureRM.Aks.psd1")
Copy link
Contributor

Choose a reason for hiding this comment

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

Update from AzureRM.Aks.psd1 to Az.Aks.psd1

AzureSession.Instance.DataStore.WriteFile(Path.Combine(home, ".azure", "acsServicePrincipal.json"), jsonOutput);
}
}
).WithManagementClients(
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove the invocation of WithManagementClients()

.Build();
}

private static ContainerServiceClient GetContainerServiceClient(MockContext context)
Copy link
Contributor

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<ContainerServiceClient>();
}
private MicrosoftGraphClient GetGraphManagementClient(MockContext context)
Copy link
Contributor

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<MicrosoftGraphClient>();
}
private static AuthorizationManagementClient GetAuthorizationManagementClient(MockContext context)
Copy link
Contributor

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<AuthorizationManagementClient>();
}
private static ResourceManagementClient GetInternalResourceManagementClient(MockContext context)
Copy link
Contributor

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.

@vidai-msft vidai-msft assigned ziyuezh576 and unassigned vidai-msft Apr 24, 2022
Copy link
Contributor

@vidai-msft vidai-msft left a comment

Choose a reason for hiding this comment

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

WithMockContextAction() still not removed.

vidai-msft
vidai-msft previously approved these changes Apr 25, 2022
Copy link
Contributor

@vidai-msft vidai-msft left a comment

Choose a reason for hiding this comment

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

Looks good !

@@ -0,0 +1,87 @@
using System;
Copy link
Member

Choose a reason for hiding this comment

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

License header

@isra-fel isra-fel merged commit a229858 into Azure:main Apr 27, 2022
@ziyuezh576 ziyuezh576 deleted the AksTestRunner branch April 28, 2022 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Test Infra Test framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants