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

Refactor Module to Remove Harness - Fixes #188 #214

Merged
merged 10 commits into from
Apr 13, 2019

Conversation

PlagueHO
Copy link
Member

@PlagueHO PlagueHO commented Apr 5, 2019

Pull Request (PR) description

This PR refactors the module to remove the harness structure and enable Example publishing to the PS Gallery. I also updated the test headers to meet the latest versions in the template.

This Pull Request (PR) fixes the following issues

Task list

  • Added an entry under the Unreleased section of the change log in the CHANGELOG.md.
    Entry should say what was changed, and how that affects users (if applicable).
  • Resource documentation added/updated in README.md in the resource folder.
  • Resource parameter descriptions added/updated in 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? Thank you as always!


This change is Reviewable

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

Codecov Report

Merging #214 into dev will decrease coverage by 6%.
The diff coverage is n/a.

Impacted file tree graph

@@         Coverage Diff         @@
##           dev   #214    +/-   ##
===================================
- Coverage   90%    83%    -7%     
===================================
  Files        8     10     +2     
  Lines      858   1068   +210     
===================================
+ Hits       775    891   +116     
- Misses      83    177    +94

@johlju
Copy link
Member

johlju commented Apr 10, 2019

I will get on this this weekend, to much at the day job at the moment. 🙂

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 95 of 95 files at r1.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @PlagueHO)


Tests/Integration/MSFT_PowerShellExecutionPolicy.Integration.Tests.ps1, line 2 at r1 (raw file):

#region HEADER
$script:dscModuleName = 'DscResource.Template'

Duplicate. Throughout all the tests.


Tests/Integration/MSFT_PowerShellExecutionPolicy.Integration.Tests.ps1, line 3 at r1 (raw file):

#region HEADER
$script:dscModuleName = 'DscResource.Template'
$script:DSCModuleName = 'ComputerManagementDsc'

$script:dscModuleName (lower-case 'dsc'). Throughout all the tests..


Tests/Integration/MSFT_PowerShellExecutionPolicy.Integration.Tests.ps1, line 4 at r1 (raw file):

$script:DSCResourceName

$script:dscResourceName (lower-case 'dsc'). Throughout all the tests..

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.

All good catches! Done!

Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @johlju)


Tests/Integration/MSFT_PowerShellExecutionPolicy.Integration.Tests.ps1, line 2 at r1 (raw file):

Previously, johlju (Johan Ljunggren) wrote…

Duplicate. Throughout all the tests.

Done.


Tests/Integration/MSFT_PowerShellExecutionPolicy.Integration.Tests.ps1, line 3 at r1 (raw file):

Previously, johlju (Johan Ljunggren) wrote…

$script:dscModuleName (lower-case 'dsc'). Throughout all the tests..

Done.


Tests/Integration/MSFT_PowerShellExecutionPolicy.Integration.Tests.ps1, line 4 at r1 (raw file):

Previously, johlju (Johan Ljunggren) wrote…
$script:DSCResourceName

$script:dscResourceName (lower-case 'dsc'). Throughout all the tests..

Done.

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:

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


Tests/Unit/MSFT_VirtualMemory.Tests.ps1, line 12 at r2 (raw file):

& git.exe

Non-blocking. Why git.exe here? It is not in any other tests file? 🙂

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.

Reviewable status: 94 of 95 files reviewed, all discussions resolved (waiting on @johlju)


Tests/Unit/MSFT_VirtualMemory.Tests.ps1, line 12 at r2 (raw file):

Previously, johlju (Johan Ljunggren) wrote…
& git.exe

Non-blocking. Why git.exe here? It is not in any other tests file? 🙂

I have no idea! I've changed it now. Can you approve this one again?

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:

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

@johlju
Copy link
Member

johlju commented Apr 13, 2019

@PlagueHO All good now! I will rebase my PR as soon you have merged this one. 😃

@PlagueHO PlagueHO merged commit 91eba65 into dsccommunity:dev Apr 13, 2019
@kwirkykat kwirkykat removed the needs review The pull request needs a code review. label Apr 13, 2019
@PlagueHO PlagueHO deleted the Issue-188 branch April 13, 2019 20:59
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.

Refactor Repository Folder Structure so Harness not Required
4 participants