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

Invoke-DscResourceTest support Pester 5 #76

Merged
merged 2 commits into from
May 30, 2020

Conversation

johlju
Copy link
Member

@johlju johlju commented May 28, 2020

Fixed

  • Update build.yaml to support latest ModuleBuilder.
  • Pinned required module Pester to 4.10.1.
  • Update CONTRIBUTING.md.

Changes

  • The cmdlet Invoke-DscResourceTest support running test in Pester 5.

This change is Reviewable

@johlju johlju added the needs review The pull request needs a code review. label May 28, 2020
Copy link
Member

@PlagueHO PlagueHO left a comment

Choose a reason for hiding this comment

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

Reviewed 5 of 5 files at r1.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @johlju)


source/Public/Invoke-DscResourceTest.ps1, line 20 at r1 (raw file):

        [Alias('Script', 'relative_path')]
        [System.Object[]]
        ${Path},

FYI, Nitpick: Is there any reason why we're using the curly braces round the variable name in all of these?


source/Public/Invoke-DscResourceTest.ps1, line 24 at r1 (raw file):

        [Parameter(Position = 2)]
        [Alias('Name')]
        [string[]]

For consistency can we use the full typename?


source/Public/Invoke-DscResourceTest.ps1, line 110 at r1 (raw file):

            'ByModuleNameOrPath'
            {
                Write-Verbose "Calling DscResource Test by Module Name (Or Path)"

Positional parameter here - also should use single quotes.


source/Public/Invoke-DscResourceTest.ps1, line 124 at r1 (raw file):

            'ByModuleSpecification'
            {
                Write-Verbose "Calling DscResource Test by Module Specification"

Positional parameter here - also should use single quotes.

@johlju johlju requested a review from PlagueHO May 30, 2020 09:04
Copy link
Member Author

@johlju johlju left a comment

Choose a reason for hiding this comment

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

I fixed the style thorughout.

Reviewable status: 4 of 5 files reviewed, 3 unresolved discussions (waiting on @PlagueHO)


source/Public/Invoke-DscResourceTest.ps1, line 20 at r1 (raw file):

Previously, PlagueHO (Daniel Scott-Raynsford) wrote…

FYI, Nitpick: Is there any reason why we're using the curly braces round the variable name in all of these?

No reason unless the parameter names have spaces in them. Removed. :)


source/Public/Invoke-DscResourceTest.ps1, line 24 at r1 (raw file):

Previously, PlagueHO (Daniel Scott-Raynsford) wrote…

For consistency can we use the full typename?

Done.


source/Public/Invoke-DscResourceTest.ps1, line 110 at r1 (raw file):

Previously, PlagueHO (Daniel Scott-Raynsford) wrote…

Positional parameter here - also should use single quotes.

Done.


source/Public/Invoke-DscResourceTest.ps1, line 124 at r1 (raw file):

Previously, PlagueHO (Daniel Scott-Raynsford) wrote…

Positional parameter here - also should use single quotes.

Done.

@johlju
Copy link
Member Author

johlju commented May 30, 2020

@PlagueHO Ready for review again.

Copy link
Member

@PlagueHO PlagueHO left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 1 of 1 files at r2.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@johlju johlju merged commit baefd94 into dsccommunity:master May 30, 2020
@johlju johlju deleted the fix/pester5 branch May 30, 2020 09:10
@johlju
Copy link
Member Author

johlju commented May 30, 2020

I will release this as soon as the tests passes. Now it is just the hard task of converting the HQRM tests.

@johlju johlju removed the needs review The pull request needs a code review. label May 30, 2020
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.

2 participants