Skip to content

Conversation

@matthchr
Copy link
Member

@matthchr matthchr commented Oct 27, 2017

Description


This checklist is used to make sure that common guidelines for a pull request are followed. You can find a more complete discussion of PowerShell cmdlet best practices here.

General Guidelines

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.
  • The pull request does not introduce breaking changes (unless a major version change occurs in the assembly and module).

Testing Guidelines

  • Pull request includes test coverage for the included changes.
  • PowerShell scripts used in tests should do any necessary setup as part of the test or suite setup, and should not use hard-coded values for locations or existing resources.

Cmdlet Signature Guidelines

  • New cmdlets that make changes or have side effects should implement ShouldProcess and have SupportShouldProcess=true specified in the cmdlet attribute. You can find more information on ShouldProcess here.
  • Cmdlet specifies OutputType attribute if any output is produced - if the cmdlet produces no output, it should implement a PassThru parameter.

Cmdlet Parameter Guidelines

  • Parameter types should not expose types from the management library - complex parameter types should be defined in the module.
  • Complex parameter types are discouraged - a parameter type should be simple types as often as possible. If complex types are used, they should be shallow and easily creatable from a constructor or another cmdlet.
  • Cmdlet parameter sets should be mutually exclusive - each parameter set must have at least one mandatory parameter not in other parameter sets.

@matthchr
Copy link
Member Author

This PR is in preparation for adding Batch AAD support. See #4762 for the official support.

@matthchr
Copy link
Member Author

@markcowl please take a look when you get a chance

Copy link
Member

@markcowl markcowl left a comment

Choose a reason for hiding this comment

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

Requested test changes for regression protection and type conversion for display types. Otherise, LGTM

Copy link
Member

Choose a reason for hiding this comment

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

can we add in tests that verify this value - we have tests that check the output type, and tests that check the value that is saved in the context

Copy link
Member Author

Choose a reason for hiding this comment

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

Okay, I have updated the TypeConversionTests as well (I hadn't realized they were there earlier).

Can you point me to the test classes/methods for any other tests which I should update?

Copy link
Member

Choose a reason for hiding this comment

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

I think we want to use BatchAudience as well

Copy link
Member Author

Choose a reason for hiding this comment

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

As an alias you mean? Will add it.

Copy link
Member Author

Choose a reason for hiding this comment

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

This is done

Copy link
Member

Choose a reason for hiding this comment

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

Note, I think you will also need to change the constructors and type conversion operators for PSAzureEnvinronment to include this value. If you add this value into existing test validation overt these types, you'll see the code you need to change.

Copy link
Member Author

Choose a reason for hiding this comment

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

This was already done I think, right? I made the change to PSAzureEnvironment(PSObject other) already, and to Equals in PSAzureEnvironment - Did I need to do something else too?

@matthchr matthchr force-pushed the feature/batch-aad-common branch from 960c3ff to 57d0ae5 Compare October 30, 2017 17:59
@markcowl
Copy link
Member

markcowl commented Oct 30, 2017

@matthchr
Copy link
Member Author

@markcowl It looks like the on-demand run failed? I am not sure if it's related to this change or not though (logs are hard to parse...)

@cormacpayne cormacpayne merged commit dad7b1a into Azure:preview Oct 30, 2017
@matthchr matthchr deleted the feature/batch-aad-common branch October 30, 2017 23:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants