-
Notifications
You must be signed in to change notification settings - Fork 54
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
xClusterPreferredOwner: Refactor unit test #98
xClusterPreferredOwner: Refactor unit test #98
Conversation
Refactored the unit test for this resource to use stubs and increase coverage (issue dsccommunity#76).
Changed the code to be more aligned with the style guideline. Added examples - 1-AddPreferredOwner.ps1 - 2-RemovePreferredOwner.ps1 Added links to examples from README.md.
@johlju, |
Closing this and reopen to kick off the AppVeyor test again. |
@johlju, |
Codecov Report
@@ Coverage Diff @@
## dev #98 +/- ##
==================================
+ Coverage 70% 83% +12%
==================================
Files 6 6
Lines 292 315 +23
==================================
+ Hits 207 263 +56
+ Misses 85 52 -33 |
@bgelens This one is ready for review whenever you got time. |
Small things. Looking good! Reviewed 7 of 8 files at r1, 1 of 1 files at r2. CHANGELOG.md, line 81 at r2 (raw file):
Unicode char? DSCResources/MSFT_xClusterPreferredOwner/MSFT_xClusterPreferredOwner.psm1, line 64 at r2 (raw file):
why like? are there wildcards allowed for $ClusterResources? DSCResources/MSFT_xClusterPreferredOwner/MSFT_xClusterPreferredOwner.psm1, line 163 at r2 (raw file):
Personally I would think a resource like this handles only one state. So ensure doesn't make sense to me. Instead I would think the resource would govern the owners specified in the configuration and would purge anything else instead of being additive. I'll mark this as satisfied as it is not blocking but just wanted to give my opinion :) Examples/Resources/xClusterPreferredOwner/2-RemovePreferredOwner.ps1, line 31 at r2 (raw file):
This is what I was talking about... The resource is handling desired state a an imperative operation. So to fix a situation, first I have to remove owners, then push another config that would be consistent with my desired state... see what I mean? Comments from Reviewable |
Review status: 7 of 8 files reviewed at latest revision, 3 unresolved discussions. CHANGELOG.md, line 81 at r2 (raw file): Previously, bgelens (Ben Gelens) wrote…
Done. Hit the wrong key ;) DSCResources/MSFT_xClusterPreferredOwner/MSFT_xClusterPreferredOwner.psm1, line 64 at r2 (raw file): Previously, bgelens (Ben Gelens) wrote…
Done. Submitted issue #101 (BREAKING CHANGE: xClusterPreferredOwner: Resource allows wildcards for ClusterGroup and ClusterResources) DSCResources/MSFT_xClusterPreferredOwner/MSFT_xClusterPreferredOwner.psm1, line 163 at r2 (raw file): Previously, bgelens (Ben Gelens) wrote…
Done. Submitted issue #102 (xClusterPreferredOwner: Is the behavior of parameter Ensure correct?) to discuss this. Examples/Resources/xClusterPreferredOwner/2-RemovePreferredOwner.ps1, line 31 at r2 (raw file): Previously, bgelens (Ben Gelens) wrote…
Done. Submitted issue #102 (xClusterPreferredOwner: Is the behavior of parameter Ensure correct?) to discuss this. Comments from Reviewable |
Reviewed 1 of 1 files at r3. Comments from Reviewable |
Pull Request (PR) description
(issue xClusterPreferredOwner: Unit tests does not use the correct template and folder structure is wrong #76).
This Pull Request (PR) fixes the following issues:
Fixes #76
Fixes #52
Task list:
This change is