Skip to content

Commit

Permalink
xCluster: Refactored unit test (#82)
Browse files Browse the repository at this point in the history
- Changes to xFailOverCluster
  - Added new stubs for FailoverClusters module (Tests\Unit\Stubs\FailoverClusters.stubs.psm1) to be able to run unit tests on a computer that does not have or can install Failover Clustering PowerShell module.
  - Added a script file (Tests\Unit\Stubs\Write-ModuleStubFile.ps1) to be able to rebuild the stub file (FailoverClusters.stubs.psm1) whenever needed.
- Changes to xCluster
  - Refactored the unit test for this resource to use stubs and increase coverage (issue #73).
    - Removed the password file (MSFT_xCluster.password.txt) which seemed unnecessary.
  - Test-TargetResource now throws and error if domain name cannot be evaluated (issue #72).
  - Set-TargetResource now correctly throws and error if domain name cannot be evaluated (issue #71).
  • Loading branch information
johlju authored Jul 3, 2017
1 parent 6acaaee commit 5f64226
Show file tree
Hide file tree
Showing 9 changed files with 1,370 additions and 279 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
.vs
.vscode
node_modules
.markdownlint.json
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,26 @@
press SHIFT+ALT+F, or press F1 and choose 'Format document' in the list. The
PowerShell code will then be formatted according to the Style Guideline
(although maybe not complete, but would help a long way).
- Added new stubs for FailoverClusters module
(Tests\Unit\Stubs\FailoverClusters.stubs.psm1) to be able to run unit tests
on a computer that does not have or can install Failover Clustering
PowerShell module.
- Added a script file (Tests\Unit\Stubs\Write-ModuleStubFile.ps1) to be able
to rebuild the stub file (FailoverClusters.stubs.psm1) whenever needed.
- Changes to xCluster
- Added examples
- 1-CreateFirstNodeOfAFailoverCluster.ps1
- 2-JoinAdditionalNodeToFailoverCluster.ps1
- 3-CreateFailoverClusterWithTwoNodes.ps1 (this is the example from README.md)
- Fixed typo in xCluster parameter description.
- Added links to examples from README.md
- Refactored the unit test for this resource to use stubs and increase coverage
(issue #73).
- Removed the password file (MSFT_xCluster.password.txt) which seemed unnecessary.
- Test-TargetResource now throws and error if domain name cannot be evaluated
(issue #72).
- Set-TargetResource now correctly throws and error if domain name cannot be
evaluated (issue #71).
- Changes to xWaitForCluster
- Added example
- 1-WaitForFailoverClusterToBePresent.ps1
Expand Down
Loading

0 comments on commit 5f64226

Please sign in to comment.