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

Update CommonResourceHelper, ResourceHelper, MSFT_xDSCWebService and MSFT_xDSCWebService tests to Pester 4 standards #475

Merged
merged 3 commits into from
Jan 20, 2019

Conversation

PlagueHO
Copy link
Member

@PlagueHO PlagueHO commented Jan 20, 2019

Pull Request (PR) description

This PR:

  • Update CommonResourceHelper unit tests to meet Pester 4.0.0
    standards (issue #473).
  • Update ResourceHelper unit tests to meet Pester 4.0.0
    standards (issue #473).
  • Update MSFT_xDSCWebService unit tests to meet Pester 4.0.0
    standards (issue #473).
  • Update MSFT_xDSCWebService integration tests to meet Pester 4.0.0
    standards (issue #473).

This Pull Request (PR) fixes the following issues

Task list

  • Added an entry under the Unreleased section of the change log in the README.md.
    Entry should say what was changed, and how that affects users (if applicable).
  • Resource documentation added/updated in README.md.
  • Resource parameter descriptions added/updated in README.md, schema.mof
    and comment-based help.
  • Comment-based help added/updated.
  • Localization strings added/updated in all localization files as appropriate.
  • Examples appropriately added/updated.
  • Unit tests added/updated. See DSC Resource Testing Guidelines.
  • Integration tests added/updated (where possible). See DSC Resource Testing Guidelines.
  • New/changed code adheres to DSC Resource Style Guidelines and Best Practices.

@johlju would you mind reviewing when you get a moment. Should be straight forward.


This change is Reviewable

…MSFT_xDSCWebService tests to Pester 4 standards
Copy link
Member

@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.

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


Tests/Integration/MSFT_xDSCWebService.xxx.ps1, line 45 at r1 (raw file):

                    Name   = ???DSC-Service???

Something strange happened here? Quotes was replaced by three question marks. Throughout this file.


Tests/Integration/MSFT_xDSCWebService.xxx.ps1, line 53 at r1 (raw file):

should -not -throw

Maybe Should -Not -Throw. Upper case throughout.


Tests/Integration/MSFT_xDSCWebService.xxx.ps1, line 121 at r1 (raw file):

should -be 0
should -not -throw

Maybe Should -Be-. Upper case throughout.


Tests/Unit/MSFT_xDSCWebService.Tests.ps1, line 535 at r1 (raw file):

-be

-Be. Upper case throughout.

@PlagueHO PlagueHO added the needs review The pull request needs a code review. label Jan 20, 2019
@codecov-io
Copy link

Codecov Report

Merging #475 into dev will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@         Coverage Diff         @@
##            dev   #475   +/-   ##
===================================
  Coverage    72%    72%           
===================================
  Files        27     27           
  Lines      4022   4022           
  Branches      4      4           
===================================
  Hits       2921   2921           
  Misses     1097   1097           
  Partials      4      4

Copy link
Member Author

@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.

Thanks for reviewing @johlju. The integration tests for xDscWebService (the ones that are disabled) are actually pretty messed up (they could never work). I've improved them a bit but they're going to need a lot more work to make them: a) useful and b) working

No idea how they could ever get into that state - looks like they've not worked in a LONG time. Will raise an issue to fix them.

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


Tests/Integration/MSFT_xDSCWebService.xxx.ps1, line 45 at r1 (raw file):

Previously, johlju (Johan Ljunggren) wrote…
                    Name   = ???DSC-Service???

Something strange happened here? Quotes was replaced by three question marks. Throughout this file.

Done.


Tests/Integration/MSFT_xDSCWebService.xxx.ps1, line 53 at r1 (raw file):

Previously, johlju (Johan Ljunggren) wrote…
should -not -throw

Maybe Should -Not -Throw. Upper case throughout.

Done.


Tests/Integration/MSFT_xDSCWebService.xxx.ps1, line 121 at r1 (raw file):

Previously, johlju (Johan Ljunggren) wrote…
should -be 0
should -not -throw

Maybe Should -Be-. Upper case throughout.

Done.


Tests/Unit/MSFT_xDSCWebService.Tests.ps1, line 535 at r1 (raw file):

Previously, johlju (Johan Ljunggren) wrote…
-be

-Be. Upper case throughout.

Done.

Copy link
Member Author

@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.

Raised issue to correct integration tests: #476

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

Copy link
Member

@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.

:lgtm:

Yes, this resource moudel need a lot of love - one step at a time. 😄

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

@PlagueHO
Copy link
Member Author

Thanks @johlju

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs review The pull request needs a code review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants