-
Notifications
You must be signed in to change notification settings - Fork 25
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
(#4) Adds Windows Sandbox to Test-Package #26
base: master
Are you sure you want to change the base?
Conversation
This adds a really messy addition to the Test-Package function, which allows users to test package install/uninstall with Windows Sandbox rather than Vagrant or Local testing. It is not in my regular style but attempts to match the existing function. I'm not fully successful in this.
@JPRuskin, what you've done here looks pretty good. What do you mean by "I'm not fully successful in this"? |
Ah, mostly just that my code-style doesn't fully match the rest of the module as it's currently written. I'll say that the way you currently need to invoke sandbox doesn't help this! |
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.
Instead of a classic review, here is a PR with a few changes I'd like to share regarding your work on Sandbox: JPRuskin#1
Copy-Item -Path $Nu -Destination $SandboxTempFolder | ||
|
||
try { | ||
& WindowsSandbox "$SandboxTempFolder\ChocoTestingSandbox.wsb" |
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.
if ($Results.InstallExitCode -ne 0) { throw "choco install failed with $($Results.InstallExitCode)"} | ||
} | ||
if ($Uninstall) { | ||
if ($Results.UninstallExitCode -ne 0) { throw "choco install failed with $($Results.UninstallExitCode)"} |
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.
Should be choco uninstall failed
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.
Very true! I'll get that sorted
Description
This adds a really messy addition to the Test-Package function, which allows users to test package install/uninstall with Windows Sandbox rather than Vagrant or Local testing.
It is not in my regular style but attempts to match the existing function. I'm not fully successful in this.
Motivation / Context
There was a request to use Windows Sandbox, which is wonderfully performant, for package testing. This seemed like a great addition!
Fixes #4.