Skip to content
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

Cleanup and version query parameters #24924

Conversation

mentat9
Copy link
Member

@mentat9 mentat9 commented May 14, 2024

Description

Fix default formatting for output objects
Remove leftover auto-generated InputObject
Implement -Version and -ListVersion parameters on Get-AzPolicy[Set]Definition Add tests for -Version and -ListVersion
[re]recorded all tests

Mandatory Checklist

  • SHOULD update ChangeLog.md file(s) appropriately
    • For SDK-based development mode, update src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.
      • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header in the past tense.
    • For autorest-based development mode, include the changelog in the PR description.
    • Should not change ChangeLog.md if no new release is required, such as fixing test case only.
  • SHOULD regenerate markdown help files if there is cmdlet API change. Instruction
  • SHOULD have proper test coverage for changes in pull request.
  • SHOULD NOT adjust version of module manually in pull request

mentat9 and others added 30 commits November 22, 2023 10:01
* Set all tests to -LiveOnly
Add back some test infrastructure fixes that were lost
Improve parameter handling for Remove-AzPolicySetDefinition

* Move to supported way of sharing Helpers.psm1 file

* Switch to recommended approach for shared functions
Update to Azure Policy 2023-04-01
Move to non-versioned interface types
Complete full test suite for existing cmdlets
Few bug fixes
Add completer for Location parameter
Fix record/playback, remove -LiveOnly tags
Make test names repeatable to work with record/playback
Implement resource group functions that became inaccessible
Fix test failures due to default parameter injection
Update to Azure Policy 2023-04-01
Move to non-versioned interface types
Complete full test suite for existing cmdlets
Few bug fixes
Add completer for Location parameter
Fix record/playback, remove -LiveOnly tags
Make test names repeatable to work with record/playback
Implement resource group functions that became inaccessible
Fix test failures due to default parameter injection
Remove unsupported (for now) parameters
Streamline common test code
Move common test code to utils.ps1
Add serialization of test variables to env.json
* Update to autorest 4.x
Update to Azure Policy 2023-04-01
Move to non-versioned interface types
Complete full test suite for existing cmdlets
Few bug fixes
Add completer for Location parameter
Fix record/playback, remove -LiveOnly tags
Make test names repeatable to work with record/playback
Implement resource group functions that became inaccessible
Fix test failures due to default parameter injection

* Clean up some transforms in README
Remove unsupported (for now) parameters
Streamline common test code
Move common test code to utils.ps1
Add serialization of test variables to env.json

* Remove extra parameters from Get-AzPolicyAssignment
Rerecord the tests
* Update to autorest 4.x
Update to Azure Policy 2023-04-01
Move to non-versioned interface types
Complete full test suite for existing cmdlets
Few bug fixes
Add completer for Location parameter
Fix record/playback, remove -LiveOnly tags
Make test names repeatable to work with record/playback
Implement resource group functions that became inaccessible
Fix test failures due to default parameter injection

* Clean up some transforms in README
Remove unsupported (for now) parameters
Streamline common test code
Move common test code to utils.ps1
Add serialization of test variables to env.json

* Remove extra parameters from Get-AzPolicyAssignment
Rerecord the tests

* Fix $testFilesFolder calculation to work on macOS/linux.
Correct definitions, validation, and tests for New-AzPolicyAssignment parameters
Re-record all tests
* Update to autorest 4.x
Update to Azure Policy 2023-04-01
Move to non-versioned interface types
Complete full test suite for existing cmdlets
Few bug fixes
Add completer for Location parameter
Fix record/playback, remove -LiveOnly tags
Make test names repeatable to work with record/playback
Implement resource group functions that became inaccessible
Fix test failures due to default parameter injection

* Clean up some transforms in README
Remove unsupported (for now) parameters
Streamline common test code
Move common test code to utils.ps1
Add serialization of test variables to env.json

* Remove extra parameters from Get-AzPolicyAssignment
Rerecord the tests

* Fix $testFilesFolder calculation to work on macOS/linux.

* Hide generated parameter sets for New-*
Correct definitions, validation, and tests for New-AzPolicyAssignment parameters
Re-record all tests
Move to autorest 4.0.690
Update managed identity properties to match generation changes
Remove several parameter transforms no longer needed
Rerecord all tests
91 tests still failing on -Playback with the same signature
Update cmdlets to use Scope and Id directly
Rerecord all tests
All tests pass in -Record mode
Failures in -Playback mode unchanged
)

* Update to autorest 4.x
Update to Azure Policy 2023-04-01
Move to non-versioned interface types
Complete full test suite for existing cmdlets
Few bug fixes
Add completer for Location parameter
Fix record/playback, remove -LiveOnly tags
Make test names repeatable to work with record/playback
Implement resource group functions that became inaccessible
Fix test failures due to default parameter injection

* Clean up some transforms in README
Remove unsupported (for now) parameters
Streamline common test code
Move common test code to utils.ps1
Add serialization of test variables to env.json

* Remove extra parameters from Get-AzPolicyAssignment
Rerecord the tests

* Fix $testFilesFolder calculation to work on macOS/linux.

* Hide generated parameter sets for New-*
Correct definitions, validation, and tests for New-AzPolicyAssignment parameters
Re-record all tests

* Replace Get-AzContext with Utils\Get-SubscriptionIdTestSafe
Move to autorest 4.0.690
Update managed identity properties to match generation changes
Remove several parameter transforms no longer needed
Rerecord all tests
91 tests still failing on -Playback with the same signature

* Remove location completer from exports/docs/examples/help

* Improve location completer tests

* Remove transforms for Scope and Id parameters no longer needed
Update cmdlets to use Scope and Id directly
Rerecord all tests
All tests pass in -Record mode
Failures in -Playback mode unchanged
Preserve "extra" input parameters in Update-* calls to Get-* in order to support -Playback test mode
Tag test files that don't support -Playback mode as LiveOnly
Rerecord all recording files
* Update to autorest 4.x
Update to Azure Policy 2023-04-01
Move to non-versioned interface types
Complete full test suite for existing cmdlets
Few bug fixes
Add completer for Location parameter
Fix record/playback, remove -LiveOnly tags
Make test names repeatable to work with record/playback
Implement resource group functions that became inaccessible
Fix test failures due to default parameter injection

* Clean up some transforms in README
Remove unsupported (for now) parameters
Streamline common test code
Move common test code to utils.ps1
Add serialization of test variables to env.json

* Remove extra parameters from Get-AzPolicyAssignment
Rerecord the tests

* Fix $testFilesFolder calculation to work on macOS/linux.

* Hide generated parameter sets for New-*
Correct definitions, validation, and tests for New-AzPolicyAssignment parameters
Re-record all tests

* Replace Get-AzContext with Utils\Get-SubscriptionIdTestSafe
Move to autorest 4.0.690
Update managed identity properties to match generation changes
Remove several parameter transforms no longer needed
Rerecord all tests
91 tests still failing on -Playback with the same signature

* Remove location completer from exports/docs/examples/help

* Improve location completer tests

* Remove transforms for Scope and Id parameters no longer needed
Update cmdlets to use Scope and Id directly
Rerecord all tests
All tests pass in -Record mode
Failures in -Playback mode unchanged

* Change location completer to lazy load (vs. module load)
Preserve "extra" input parameters in Update-* calls to Get-* in order to support -Playback test mode
Tag test files that don't support -Playback mode as LiveOnly
Rerecord all recording files
Rerecord all tests
Move 4 test files back to LiveOnly
* Update to autorest 4.x
Update to Azure Policy 2023-04-01
Move to non-versioned interface types
Complete full test suite for existing cmdlets
Few bug fixes
Add completer for Location parameter
Fix record/playback, remove -LiveOnly tags
Make test names repeatable to work with record/playback
Implement resource group functions that became inaccessible
Fix test failures due to default parameter injection

* Clean up some transforms in README
Remove unsupported (for now) parameters
Streamline common test code
Move common test code to utils.ps1
Add serialization of test variables to env.json

* Remove extra parameters from Get-AzPolicyAssignment
Rerecord the tests

* Fix $testFilesFolder calculation to work on macOS/linux.

* Hide generated parameter sets for New-*
Correct definitions, validation, and tests for New-AzPolicyAssignment parameters
Re-record all tests

* Replace Get-AzContext with Utils\Get-SubscriptionIdTestSafe
Move to autorest 4.0.690
Update managed identity properties to match generation changes
Remove several parameter transforms no longer needed
Rerecord all tests
91 tests still failing on -Playback with the same signature

* Remove location completer from exports/docs/examples/help

* Improve location completer tests

* Remove transforms for Scope and Id parameters no longer needed
Update cmdlets to use Scope and Id directly
Rerecord all tests
All tests pass in -Record mode
Failures in -Playback mode unchanged

* Change location completer to lazy load (vs. module load)
Preserve "extra" input parameters in Update-* calls to Get-* in order to support -Playback test mode
Tag test files that don't support -Playback mode as LiveOnly
Rerecord all recording files

* Minor updates for consistency
Rerecord all tests
Move 4 test files back to LiveOnly
Make changes to ensure consistent and valid handling of $location
Rerecord tests
Rerecord two test files
mentat9 and others added 14 commits April 3, 2024 16:01
* Update to autorest 4.x
Update to Azure Policy 2023-04-01
Move to non-versioned interface types
Complete full test suite for existing cmdlets
Few bug fixes
Add completer for Location parameter
Fix record/playback, remove -LiveOnly tags
Make test names repeatable to work with record/playback
Implement resource group functions that became inaccessible
Fix test failures due to default parameter injection

* Clean up some transforms in README
Remove unsupported (for now) parameters
Streamline common test code
Move common test code to utils.ps1
Add serialization of test variables to env.json

* Remove extra parameters from Get-AzPolicyAssignment
Rerecord the tests

* Fix $testFilesFolder calculation to work on macOS/linux.

* Hide generated parameter sets for New-*
Correct definitions, validation, and tests for New-AzPolicyAssignment parameters
Re-record all tests

* Replace Get-AzContext with Utils\Get-SubscriptionIdTestSafe
Move to autorest 4.0.690
Update managed identity properties to match generation changes
Remove several parameter transforms no longer needed
Rerecord all tests
91 tests still failing on -Playback with the same signature

* Remove location completer from exports/docs/examples/help

* Improve location completer tests

* Remove transforms for Scope and Id parameters no longer needed
Update cmdlets to use Scope and Id directly
Rerecord all tests
All tests pass in -Record mode
Failures in -Playback mode unchanged

* Change location completer to lazy load (vs. module load)
Preserve "extra" input parameters in Update-* calls to Get-* in order to support -Playback test mode
Tag test files that don't support -Playback mode as LiveOnly
Rerecord all recording files

* Minor updates for consistency
Rerecord all tests
Move 4 test files back to LiveOnly

* Updates for consistency and to fix tests
Make changes to ensure consistent and valid handling of $location
Rerecord tests

* Fix bad merge
Rerecord two test files

* Re-record tests
 - Add ResourceId to Get-AzPolicy[Set]Definition
 - Change -BuiltIn to -Builtin
 - Add -InputObject parameter to Update-* cmdlets
 - Control ErrorAction behavior for Get-AzPolicy[Set]Definition
Deprecate the -BackwardCompatible switch
* Update to autorest 4.x
Update to Azure Policy 2023-04-01
Move to non-versioned interface types
Complete full test suite for existing cmdlets
Few bug fixes
Add completer for Location parameter
Fix record/playback, remove -LiveOnly tags
Make test names repeatable to work with record/playback
Implement resource group functions that became inaccessible
Fix test failures due to default parameter injection

* Clean up some transforms in README
Remove unsupported (for now) parameters
Streamline common test code
Move common test code to utils.ps1
Add serialization of test variables to env.json

* Remove extra parameters from Get-AzPolicyAssignment
Rerecord the tests

* Fix $testFilesFolder calculation to work on macOS/linux.

* Hide generated parameter sets for New-*
Correct definitions, validation, and tests for New-AzPolicyAssignment parameters
Re-record all tests

* Replace Get-AzContext with Utils\Get-SubscriptionIdTestSafe
Move to autorest 4.0.690
Update managed identity properties to match generation changes
Remove several parameter transforms no longer needed
Rerecord all tests
91 tests still failing on -Playback with the same signature

* Remove location completer from exports/docs/examples/help

* Improve location completer tests

* Remove transforms for Scope and Id parameters no longer needed
Update cmdlets to use Scope and Id directly
Rerecord all tests
All tests pass in -Record mode
Failures in -Playback mode unchanged

* Change location completer to lazy load (vs. module load)
Preserve "extra" input parameters in Update-* calls to Get-* in order to support -Playback test mode
Tag test files that don't support -Playback mode as LiveOnly
Rerecord all recording files

* Minor updates for consistency
Rerecord all tests
Move 4 test files back to LiveOnly

* Updates for consistency and to fix tests
Make changes to ensure consistent and valid handling of $location
Rerecord tests

* Fix bad merge
Rerecord two test files

* Re-record tests

* Implement feedback:
 - Add ResourceId to Get-AzPolicy[Set]Definition
 - Change -BuiltIn to -Builtin
 - Add -InputObject parameter to Update-* cmdlets
 - Control ErrorAction behavior for Get-AzPolicy[Set]Definition
Deprecate the -BackwardCompatible switch
Remove leftover auto-generated InputObject
Implement -Version and -ListVersion parameters on Get-AzPolicy[Set]Definition Add tests for -Version and -ListVersion
[re]recorded all tests
Copy link

Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status.

@VeryEarly VeryEarly self-assigned this May 21, 2024
@mentat9 mentat9 closed this May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants