Skip to content

Commit 90808c1

Browse files
committed
#821 : Updated test runner to work for us both.
1 parent 8b74226 commit 90808c1

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

Modules/Remoting Tests - Download with RemoteScriptCall.Tests.ps1

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,11 @@ Describe "Download with RemoteScriptCall" {
139139
It "Download all SPE log files as ZIP" {
140140
$archiveFileName = Invoke-RemoteScript -Session $session -ScriptBlock {
141141
Import-Function -Name Compress-Archive
142-
Get-ChildItem -Path "$($SitecoreLogFolder)" | Where-Object { !$_.PSIsContainer -and $_.Name -match "spe.log." } |
143-
Compress-Archive -DestinationPath "$($SitecoreTempFolder)\archived.SPE.logs.zip" | Select-Object -Expand FullName
142+
143+
Get-ChildItem -Path "$($SitecoreLogFolder)" -File | Where-Object { $_.Name -match "spe.log." } |
144+
Compress-Archive -DestinationPath "$($SitecoreTempFolder)\archived.SPE.logs.zip" | Select-Object -Expand FullName
144145
}
145-
146+
146147
$destination = Join-Path -Path $destinationMediaPath -ChildPath (Split-Path -Path $archiveFileName -Leaf)
147148
Receive-RemoteItem -Session $session -Destination $destination -Path $archiveFileName
148149

@@ -164,9 +165,7 @@ Describe "Download with RemoteScriptCall" {
164165
$destination = Join-Path -Path $destinationMediaPath -ChildPath $_
165166
Receive-RemoteItem -Session $session -Destination $destination -Path $source -Database master
166167
Test-Path -Path $destination | Should Be $true
167-
}
168-
169-
168+
}
170169
}
171170
}
172171
}

Modules/Test on Adam's environment.ps1

Lines changed: 0 additions & 2 deletions
This file was deleted.

Modules/TestRunner.ps1

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Import-Module Pester -Force
2+
3+
$scriptParameters = @{ Path="."; Parameters=@{ protocolHost="http://sitecore81"}}
4+
if($env:USERDOMAIN -eq "Michael-Laptop") {
5+
$scriptParameters = @{ Path="."; Parameters=@{ protocolHost="https://spe.dev.local"}}
6+
}
7+
Invoke-Pester -Script $scriptParameters

0 commit comments

Comments
 (0)