-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Add tests for Dsc configuration compilation on Windows #5011
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
Add tests for Dsc configuration compilation on Windows #5011
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests have passed on Linux and Windows. I'm going to push to your branch.
| } | ||
| DSCTestConfig | ||
| "@).Invoke() |
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.
same comment
…o insivara/AddDscCompilationTests/1710
| DSCTestConfig | ||
| "@).Invoke() | ||
| "@).Invoke() | Should Not Throw; |
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to verify a file exists, please use `` | should exist` , it results it better errors
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.
Updated
|
|
||
| ".\DSCTestConfig\localhost.mof" | Should Exist | ||
|
|
||
| Remove-Item -Force -Recurse -Path DSCTestConfig |
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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