Skip to content

Issue#13 - Update all DSC resources Test-TargetResource to return $false when file being manged does not exist.#14

Merged
PlagueHO merged 6 commits intodsccommunity:devfrom
jcwalker:issue#13
Aug 5, 2018
Merged

Issue#13 - Update all DSC resources Test-TargetResource to return $false when file being manged does not exist.#14
PlagueHO merged 6 commits intodsccommunity:devfrom
jcwalker:issue#13

Conversation

@jcwalker
Copy link
Copy Markdown
Contributor

@jcwalker jcwalker commented Aug 1, 2018

Pull Request (PR) description
Refactored Test-TargetResouce in all DSC resource to return $false if the file being managed doesn't exist. This changes the behavior to create the file instead of throwing

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

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

jcwalker and others added 3 commits July 30, 2018 21:40
If file does not exist Test-TargetResouce will return $false
Updated tests.
So Test-TargetResource return $false if file being managed doesn't exist
@codecov
Copy link
Copy Markdown

codecov bot commented Aug 1, 2018

Codecov Report

Merging #14 into dev will increase coverage by <1%.
The diff coverage is 97%.

Impacted file tree graph

@@        Coverage Diff         @@
##           dev   #14    +/-   ##
==================================
+ Coverage   99%   99%   +<1%     
==================================
  Files        3     3            
  Lines      177   192    +15     
==================================
+ Hits       176   191    +15     
  Misses       1     1

@PlagueHO PlagueHO self-assigned this Aug 3, 2018
@PlagueHO PlagueHO self-requested a review August 3, 2018 09:27
@PlagueHO PlagueHO added the needs review The pull request needs a code review. label Aug 3, 2018
@PlagueHO
Copy link
Copy Markdown
Member

PlagueHO commented Aug 3, 2018

Awesome stuff @jcwalker - it's getting late here so I'll get the review done tomorrow.

Copy link
Copy Markdown
Member

@PlagueHO PlagueHO left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really great job @jcwalker !

:lgtm:

Reviewed 6 of 9 files at r2, 1 of 1 files at r3, 1 of 2 files at r4, 3 of 3 files at r5.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@PlagueHO PlagueHO merged commit 9c379d6 into dsccommunity:dev Aug 5, 2018
@jcwalker jcwalker deleted the issue#13 branch August 31, 2018 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs review The pull request needs a code review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

KeyValuePair errors during Test-TargetResource if file doesn't exist

2 participants