This repository was archived by the owner on May 15, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 108
Adding tests to cDscResourceDesigner #100
Open
ArtWDrahn
wants to merge
36
commits into
PowerShellOrg:development
Choose a base branch
from
ArtWDrahn:development-tests
base: development
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,639
−861
Open
Changes from all commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
3b37bc0
Modifying tests not to write the errors as its distracting to the tests
ArtWDrahn 061b62b
Describing New-cDscResourceProperty
ArtWDrahn c00fd56
Describing Test-Name
ArtWDrahn 857758f
Describing Test-PropertiesForResource
ArtWDrahn c0c461c
Fixing paths which were previously null
ArtWDrahn ce9df35
Describing New-cDscResource
ArtWDrahn 99ee47a
Merge remote-tracking branch 'upstream/development' into development-…
ArtWDrahn cdab6e6
Adding New-DscManifest tests
ArtWDrahn d8dad40
Merge branch 'development' of https://github.com/PowerShellOrg/DSC in…
ArtWDrahn a685249
Cleaning up script with ISE Steroids
ArtWDrahn 5e8b9c5
Adding New-DscSchema Tests
ArtWDrahn ae1711c
Adding Get-TypeNameForSchema
ArtWDrahn f529969
Adding Test-TypeIsArray
ArtWDrahn ff242d0
Adding New-DscSchemaParameter
ArtWDrahn 90ec288
New-DelimitedList & New-DscModule
ArtWDrahn 5eb79b0
Adding Add-StringBuilderLine
ArtWDrahn a2ef1d3
Adding New-DscModuleParameter
ArtWDrahn fa49fa8
Modifying context to actually describe what is happening
ArtWDrahn a1f4cdc
Adding New-DscModuleParameter
ArtWDrahn 32c12e4
Adding Get-FunctionParamLineNumbers
ArtWDrahn 6772475
Modifying one of the tests for better code coverage
ArtWDrahn 7e26a6d
Adding New-GetTargetResourceFunction
ArtWDrahn 9507c0c
Actually Adding New-GetTargetResourceFunction
ArtWDrahn b7aee9e
formating cleanup
ArtWDrahn 6079d7c
Adding New-SetTargetResourceFunction
ArtWDrahn 9907e0b
Adding New-DscModuleReturn
ArtWDrahn efd2cbc
New-DscModuleReturn
ArtWDrahn b463750
Adding Convert-LineNumberToIndex
ArtWDrahn 7a62857
Adding Get-SortedFunctionNames
ArtWDrahn f8b91f2
Modifying New-DscModuleParameter to increase code coverage
ArtWDrahn 873d34d
Fixing typo in setup
ArtWDrahn 5285e11
modifying new-dscmodulemanifest to work without UserResource.psm1 file
ArtWDrahn d107c61
Adding Test-ResourcePath
ArtWDrahn 1d3c7a3
Merge branch 'development' of https://github.com/PowerShellOrg/DSC in…
ArtWDrahn 70592cf
Fixing regression of tests
ArtWDrahn 8ea9607
Removing bad merge and fixing up tests
ArtWDrahn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1,722 changes: 861 additions & 861 deletions
1,722
Tooling/cDscResourceDesigner/cDscResourceDesigner.psm1
Large diffs are not rendered by default.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to get rid of this mock to get this test working. The second call to New-DscManifest doesn't produce the warning if the first call is mocked, because the files won't exist during the second call.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I'm probably reading this wrong but I'm having trouble telling exactly which mock you are referring to. I'm assuming your referring to line 344?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, 344. If you allow the first call to New-ModuleManifest to execute (without mocking), then the rest of the test makes sense and works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I see what you mean, I was specifically trying not to actually write the file so I wasn't dependent on the file actually existing for the rest of the test to work. I've made a modification so this is now actually true and rejiggered the writing so what I'm doing should be a bit clearer.