updates
This commit is contained in:
@@ -77,10 +77,13 @@ try {
|
||||
[IO.File]::WriteAllText($OutFile, 'downloaded fixture')
|
||||
}
|
||||
$script:downloadCalls=0; $script:downloadRecovers=$true
|
||||
Save-OfficeDownload 'https://fixture.invalid/' (Join-Path $testRoot 'download') 2>$null
|
||||
$output = @(Save-OfficeDownload 'https://fixture.invalid/' (Join-Path $testRoot 'download') 2>&1)
|
||||
Assert-OfficeTest ($script:downloadCalls -eq 2 -and (Get-Content -LiteralPath (Join-Path $testRoot 'download') -Raw) -eq 'downloaded fixture') 'A transient download error should recover.'
|
||||
Assert-OfficeTest ($output.Count -eq 0) 'A recovered download must not emit success-stream diagnostics or Syncro errors.'
|
||||
$log = Get-Content -LiteralPath $Global:LogFile -Raw
|
||||
Assert-OfficeTest ($log -match 'Download attempt 1 of 3 failed for https://fixture.invalid/' -and $log -match 'Temporary network failure Retrying in 3 seconds' -and $log -match 'Download recovered on attempt 2: https://fixture.invalid/') 'Retry details and recovery must remain in the Tools diagnostic log.'
|
||||
$script:downloadCalls=0; $script:downloadRecovers=$false
|
||||
Assert-OfficeThrows { Save-OfficeDownload 'https://fixture.invalid/' (Join-Path $testRoot 'download') 2>$null } 'Temporary network failure'
|
||||
Assert-OfficeThrows { Save-OfficeDownload 'https://fixture.invalid/' (Join-Path $testRoot 'download') } 'Download failed after 3 attempts: https://fixture.invalid/.*Temporary network failure'
|
||||
Assert-OfficeTest ($script:downloadCalls -eq (Get-OfficeDeploymentDefinitions).DownloadAttempts) 'Persistent download failure must remain bounded.'
|
||||
}
|
||||
& {
|
||||
|
||||
Reference in New Issue
Block a user