Add -powershell and -Pester options to Start-PSPester

When testing containers, we want to use the in-box PowerShell.
This commit is contained in:
Andrew Schwartzmeyer committed 2016-09-12 15:01:19 -07:00
1 parent 03237e91b6
commit e1e014295b
2 files changed
+6 -6

No files matched your search

+2 -2
View File
@@ -27,13 +27,13 @@ for build in $BUILDS; do
image="$build/$distro"
if [[ "$TEST" -eq 1 ]]; then
echo "Testing $image"
command="cd PowerShell; Import-Module ./build.psm1; Install-Dotnet -NoSudo; Start-PSPester"
command="cd PowerShell; Import-Module ./build.psm1; Install-Dotnet -NoSudo; Start-PSPester -powershell powershell -Pester ./src/Modules/Shared/Pester"
# clone repo for stable images because it's not already done
if [[ "$build" = stable ]]; then
command="git clone --recursive https://github.com/$FORK/PowerShell -b $BRANCH; $command"
fi
# run Pester tests inside container
docker run --rm -it powershell/powershell:$build-$distro powershell -c "$command"
docker run --rm -it powershell/powershell:$build-$distro -c "$command"
else
echo "Building $image"
# copy the common script because it lives outside the docker build context