GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add tests for Dsc configuration compilation on Windows by Indhukrishna · Pull Request #5011 · PowerShell/PowerShell

Conversation

@Indhukrishna

@Indhukrishna Indhu Sivaramakrishnan (Indhukrishna) commented Oct 4, 2017

Copy link
Copy Markdown
Contributor

This PR adds tests for testing Dsc Configuration compilation on Windows. #4570

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Indhukrishna
Add tests for Dsc configuration compilation on Windows
ff9e32d
@Indhukrishna
Indhu Sivaramakrishnan (Indhukrishna) requested a review from Dongbo Wang (daxian-dbw) October 4, 2017 21:37
@Indhukrishna Indhu Sivaramakrishnan (Indhukrishna) added the Area-DSC Desired State Configuration issues label Oct 4, 2017
@SteveL-MSFT
Steve Lee (SteveL-MSFT) requested a review from Travis Plunk (TravisEz13) October 4, 2017 21:44
@SteveL-MSFT Steve Lee (SteveL-MSFT) assigned Travis Plunk (TravisEz13) Oct 4, 2017
@ArieHein

Arie Heinrich (ArieHein) commented Oct 8, 2017 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

for the sake of my OCD, please align the "Ensure" with "Destination Path" and align all three resources at the same column position. :)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Indhukrishna
Fix Indendation
73687ef
@Indhukrishna

Indhu Sivaramakrishnan (Indhukrishna) commented Oct 9, 2017

Copy link
Copy Markdown
Contributor Author

Arie Heinrich (@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?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

TravisEz13
Travis Plunk (TravisEz13) requested changes Oct 9, 2017
View reviewed changes
Comment thread test/powershell/Modules/PSDesiredStateConfiguration/MOF-Compilation.Tests.ps1 Outdated
}

DSCTestConfig
"@).Invoke()

@TravisEz13 Travis Plunk (TravisEz13) Oct 9, 2017

Copy link
Copy Markdown
Member

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@TravisEz13 Travis Plunk (TravisEz13) Oct 10, 2017

Copy link
Copy Markdown
Member

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@TravisEz13 Travis Plunk (TravisEz13) Oct 10, 2017 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread test/powershell/Modules/PSDesiredStateConfiguration/MOF-Compilation.Tests.ps1 Outdated
}

DSCTestConfig
"@).Invoke()

@TravisEz13 Travis Plunk (TravisEz13) Oct 9, 2017

Copy link
Copy Markdown
Member

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Indhu Sivaramakrishnan (Indhukrishna) added 5 commits October 9, 2017 15:14
@Indhukrishna
Merge branch 'master' of https://github.com/PowerShell/PowerShell int…
3cee181
…o insivara/AddDscCompilationTests/1710
@Indhukrishna
Update test to assert that scriptblock invocation does not throw
714b127
@Indhukrishna
Update tests to fix indentation
2964f4b
@Indhukrishna
Update test to ensure that MOF is produced after compilation
84e52a4
@Indhukrishna
Update indentation
8d1ac8c
TravisEz13
Travis Plunk (TravisEz13) previously requested changes Oct 10, 2017
View reviewed changes
Comment thread test/powershell/Modules/PSDesiredStateConfiguration/MOF-Compilation.Tests.ps1 Outdated

DSCTestConfig
"@).Invoke()
"@).Invoke() | Should Not Throw;

@TravisEz13 Travis Plunk (TravisEz13) Oct 10, 2017

Copy link
Copy Markdown
Member

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
TravisEz13
Travis Plunk (TravisEz13) reviewed Oct 10, 2017
View reviewed changes
Comment thread test/powershell/Modules/PSDesiredStateConfiguration/MOF-Compilation.Tests.ps1 Outdated
"@).Invoke()
"@).Invoke()

Test-Path -Path .\DSCTestConfig\localhost.mof | Should Be $True

@TravisEz13 Travis Plunk (TravisEz13) Oct 10, 2017

Copy link
Copy Markdown
Member

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@Indhukrishna Indhu Sivaramakrishnan (Indhukrishna) Oct 10, 2017

Copy link
Copy Markdown
Contributor Author

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Indhu Sivaramakrishnan (Indhukrishna) and others added 3 commits October 10, 2017 12:21
@Indhukrishna
Update file exist check from Test-Path to Should Exist per code revie…
5a13c3f
…w feedback
@Indhukrishna
Update name of MOF file for Wordpress configuration
99a0400
@TravisEz13
update tests to use should not throw
ef7400b
@TravisEz13
Travis Plunk (TravisEz13) dismissed their stale review October 10, 2017 21:33

issues resolved

TravisEz13
Travis Plunk (TravisEz13) previously requested changes Oct 10, 2017
View reviewed changes
Comment thread test/powershell/Modules/PSDesiredStateConfiguration/MOF-Compilation.Tests.ps1 Outdated

".\DSCTestConfig\localhost.mof" | Should Exist

Remove-Item -Force -Recurse -Path DSCTestConfig

@TravisEz13 Travis Plunk (TravisEz13) Oct 10, 2017

Copy link
Copy Markdown
Member

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...

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@TravisEz13 Travis Plunk (TravisEz13) Oct 10, 2017 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@TravisEz13
convert test to use testdrive for automatic cleanup
24c1c87
@TravisEz13
Travis Plunk (TravisEz13) dismissed their stale review October 10, 2017 22:58

issues resolved

TravisEz13
Travis Plunk (TravisEz13) approved these changes Oct 10, 2017
View reviewed changes
@TravisEz13
Travis Plunk (TravisEz13) merged commit 2a9cd72 into PowerShell:master Oct 11, 2017
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
@Indhukrishna @TravisEz13
Add tests for Dsc configuration compilation on Windows (PowerShell#5011)
eb9c471
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@TravisEz13 Travis Plunk (TravisEz13) TravisEz13 approved these changes
@daxian-dbw Dongbo Wang (daxian-dbw) Awaiting requested review from daxian-dbw

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@TravisEz13 Travis Plunk (TravisEz13)

Labels

Area-DSC Desired State Configuration issues

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@Indhukrishna @ArieHein @TravisEz13
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.