Add tests for Dsc configuration compilation on Windows#5011
Add tests for Dsc configuration compilation on Windows#5011TravisEz13 merged 11 commits intoPowerShell:masterfrom
Conversation
|
for the sake of my OCD, please align the "Ensure" with "Destination Path" and align all three resources at the same column position. :) |
|
@ArieHein Thanks for the feedback. I opened it in VSCode and ISE and fixed it. But in the Github UI, I can see that the indentation is still messed up. How do I fix this properly? |
| } | ||
|
|
||
| DSCTestConfig | ||
| "@).Invoke() |
There was a problem hiding this comment.
It might be good to put this in the form of {[Scr...Invoke()}|should not throw and/or verify the expected file gets created.
There was a problem hiding this comment.
I've submitted a PR to your branch to make this change: Indhukrishna#1
I'll make the change directly, once the tests pass if you would like me to.
There was a problem hiding this comment.
Tests have passed on Linux and Windows. I'm going to push to your branch.
| } | ||
|
|
||
| DSCTestConfig | ||
| "@).Invoke() |
…o insivara/AddDscCompilationTests/1710
|
|
||
| DSCTestConfig | ||
| "@).Invoke() | ||
| "@).Invoke() | Should Not Throw; |
There was a problem hiding this comment.
these tests should fail... a script block should be piped to should not throw
| "@).Invoke() | ||
| "@).Invoke() | ||
|
|
||
| Test-Path -Path .\DSCTestConfig\localhost.mof | Should Be $True |
There was a problem hiding this comment.
to verify a file exists, please use `` | should exist` , it results it better errors
|
|
||
| ".\DSCTestConfig\localhost.mof" | Should Exist | ||
|
|
||
| Remove-Item -Force -Recurse -Path DSCTestConfig |
There was a problem hiding this comment.
The remove should be in an AfterEach or the finally or a try{}finally{} otherwise it won't run if the test fails. Might be easier to just use the test drive...
There was a problem hiding this comment.
I've submitted a PR to resolve this: Indhukrishna#2 . I'll merge it if the tests pass.
This PR adds tests for testing Dsc Configuration compilation on Windows. #4570