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

xWaitForCluster: If domain name cannot be evaluated by Test-TargetResource it will return and array containing two $false #107

Closed
johlju opened this Issue Jul 8, 2017 · 1 comment

Comments

Projects
None yet
1 participant
@johlju
Collaborator

johlju commented Jul 8, 2017

Details of the scenario you tried and the problem that is occurring:
If domain name cannot be evaluated by Test-TargetResource it will return and array containing two $false.

This is because Test-TargetResource does not honor the return value and does not chnage code path.

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

This comment has been minimized.

Show comment
Hide comment
@johlju

johlju Jul 8, 2017

Collaborator

I will fix this when I creating Test for this resource.

Collaborator

johlju commented Jul 8, 2017

I will fix this when I creating Test for this resource.

johlju added a commit to johlju/xFailOverCluster that referenced this issue Jul 8, 2017

Changes to xWaitForCluster
Refactored the unit test for this resource to use stubs and increase coverage (issue #78).
Now the Test-TargetResource correctly returns false if the domain namn cannot be evaluated  (issue #107).

@johlju johlju referenced this issue Jul 8, 2017

Merged

xWaitForCluster: Added unit test #108

4 of 5 tasks complete

johlju added a commit to johlju/xFailOverCluster that referenced this issue Jul 14, 2017

Changes to xWaitForCluster
Refactored the unit test for this resource to use stubs and increase coverage (issue #78).
Now the Test-TargetResource correctly returns false if the domain namn cannot be evaluated  (issue #107).

johlju added a commit to johlju/xFailOverCluster that referenced this issue Jul 18, 2017

Changes to xWaitForCluster
Refactored the unit test for this resource to use stubs and increase coverage (issue #78).
Now the Test-TargetResource correctly returns false if the domain namn cannot be evaluated  (issue #107).

johlju added a commit to johlju/xFailOverCluster that referenced this issue Jul 21, 2017

Changes to xWaitForCluster
Refactored the unit test for this resource to use stubs and increase coverage (issue #78).
Now the Test-TargetResource correctly returns false if the domain namn cannot be evaluated  (issue #107).

@johlju johlju closed this in #108 Jul 23, 2017

johlju added a commit that referenced this issue Jul 23, 2017

xWaitForCluster: Added unit test (#108)
- Changes to xWaitForCluster
  - Refactored the unit test for this resource to use stubs and increase coverage
    (issue #78).
  - Now the Test-TargetResource correctly returns false if the domain name cannot
    be evaluated  (issue #107).
  - Changed the code to be more aligned with the style guideline.
  - Updated parameter description in the schema.mof.
  - Resolved Script Analyzer warnings (issue #54).
- Changes to xCluster
  - Minor style change in tests. Removed '-' infront of '-Be', '-Not', '-Throw', etc.

@johlju johlju removed the in progress label Jul 23, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment