File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
test/powershell/Modules/Microsoft.PowerShell.Management Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -203,17 +203,16 @@ Describe "Basic FileSystem Provider Tests" -Tags "CI" {
203
203
204
204
Context " Validate behavior when access is denied" {
205
205
BeforeAll {
206
+ $powershell = Join-Path $PSHOME " powershell"
206
207
if ($IsWindows )
207
208
{
208
- $powershell = " powershell.exe"
209
209
$protectedPath = Join-Path ([environment ]::GetFolderPath(" windows" )) " appcompat" " Programs"
210
210
$protectedPath2 = Join-Path $protectedPath " Install"
211
211
$newItemPath = Join-Path $protectedPath " foo"
212
212
}
213
- $errFile = " error.txt"
214
- $doneFile = " done.txt"
213
+ $errFile = " $testdrive \ error.txt"
214
+ $doneFile = " $testdrive \ done.txt"
215
215
}
216
-
217
216
AfterEach {
218
217
Remove-Item - Force $errFile - ErrorAction SilentlyContinue
219
218
Remove-Item - Force $doneFile - ErrorAction SilentlyContinue
@@ -231,7 +230,7 @@ Describe "Basic FileSystem Provider Tests" -Tags "CI" {
231
230
232
231
runas.exe / trustlevel:0x20000 " $powershell -nop -c try { $cmdline -ErrorAction Stop } catch { `$ _.FullyQualifiedErrorId | Out-File $errFile }; New-Item -Type File -Path $doneFile "
233
232
$startTime = Get-Date
234
- while (((Get-Date ) - $startTime ).TotalSeconds -lt 5 -and -not (Test-Path $doneFile ))
233
+ while (((Get-Date ) - $startTime ).TotalSeconds -lt 10 -and -not (Test-Path $doneFile ))
235
234
{
236
235
Start-Sleep - Milliseconds 100
237
236
}
You can’t perform that action at this time.
0 commit comments