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

xClusterDisk: Refactored unit tests #91

Merged
merged 3 commits into from
Jul 5, 2017

Conversation

johlju
Copy link
Member

@johlju johlju commented Jul 4, 2017

Pull Request (PR) description

This Pull Request (PR) fixes the following issues:
Fixes #90
Fixes #74

Task list:

  • Change details added to Unreleased section of CHANGELOG.md?
  • Added/updated documentation, comment-based help and descriptions in .schema.mof files where appropriate?
  • Examples appropriately updated?
  • New/changed code adheres to Style Guidelines?
  • Unit and (optional) Integration tests created/updated where possible?

This change is Reviewable

Refactored the unit test for this resource to use stubs and increase coverage (issue dsccommunity#74).
Removed an evaluation that called Test-TargetResource in Set-TargetResource method and instead added logic so that Set-TargetResource evaluates if it should remove a disk (issue dsccommunity#90).
Changed the code to be more aligned with the style guideline.
Added examples
  - 1-AddClusterDisk.ps1
  - 2-RemoveClusterDisk.ps1
 Added links to examples from README.md.
@msftclas
Copy link

msftclas commented Jul 4, 2017

@johlju,
Thanks for having already signed the Contribution License Agreement. Your agreement was validated by Microsoft. We will now review your pull request.
Thanks,
Microsoft Pull Request Bot

@johlju johlju added the needs review The pull request needs a code review. label Jul 4, 2017
@codecov-io
Copy link

codecov-io commented Jul 4, 2017

Codecov Report

Merging #91 into dev will increase coverage by 6%.
The diff coverage is 100%.

Impacted file tree graph

@@        Coverage Diff        @@
##           dev   #91   +/-   ##
=================================
+ Coverage   64%   70%   +6%     
=================================
  Files        6     6           
  Lines      292   292           
=================================
+ Hits       188   207   +19     
+ Misses     104    85   -19

@johlju
Copy link
Member Author

johlju commented Jul 4, 2017

@bgelens Next one up. When ever you have time. I will start on the next resource tomorrow. But at least this one takes us over 70% limit so that the CodeCov check becomes green 😄

@bgelens
Copy link
Contributor

bgelens commented Jul 5, 2017

:lgtm: Nice work man!


Reviewed 7 of 8 files at r1, 1 of 1 files at r2.
Review status: all files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

@johlju johlju removed the needs review The pull request needs a code review. label Jul 5, 2017
@johlju johlju merged commit abeb98c into dsccommunity:dev Jul 5, 2017
@johlju johlju deleted the refactor-unit-test-for-xClusterDisk branch July 5, 2017 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants