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

xCluster: Test-TargetResource never throws an error if domain name can't be evaluated #72

Closed
johlju opened this issue Jun 21, 2017 · 1 comment · Fixed by #82
Closed
Labels
enhancement The issue is an enhancement request.

Comments

@johlju
Copy link
Member

johlju commented Jun 21, 2017

Details of the scenario you tried and the problem that is occurring:
The function Test-TargetResource never throws an error if domain name can't be evaluated. Instead it will write a verbose message and return $false indicating that the Set-TargetResource function should run, which in this case will result in an error.
I suggest that the Test-TargetResource throws an error when domain cannot be evaluated.

The DSC configuration that is using the resource (as detailed as possible):
n/a

Version of the Operating System and PowerShell the DSC Target Node is running:
n/a

Version of the DSC module you're using, or 'dev' if you're using current dev branch:
Dev

@johlju johlju added enhancement The issue is an enhancement request. in progress The issue is being actively worked on by someone. labels Jun 21, 2017
@johlju johlju self-assigned this Jun 21, 2017
@johlju
Copy link
Member Author

johlju commented Jun 21, 2017

I'm fixing this when I working on the tests for this resource.

johlju added a commit to johlju/FailoverClusterDsc that referenced this issue Jun 21, 2017
- Refactored the unit test for this resource to use stubs and increase coverage (issue dsccommunity#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 dsccommunity#72).
- Set-TargetResource now correctly throws and error if domain name cannot be evaluated (issue dsccommunity#71).
johlju added a commit to johlju/FailoverClusterDsc that referenced this issue Jul 3, 2017
- Refactored the unit test for this resource to use stubs and increase coverage (issue dsccommunity#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 dsccommunity#72).
- Set-TargetResource now correctly throws and error if domain name cannot be evaluated (issue dsccommunity#71).
@johlju johlju closed this as completed in #82 Jul 3, 2017
johlju added a commit that referenced this issue Jul 3, 2017
- 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).
@johlju johlju removed the in progress The issue is being actively worked on by someone. label Jul 3, 2017
@johlju johlju removed their assignment Jul 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement The issue is an enhancement request.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant