Skip to content

Commit e33da2a

Browse files
committed
Add upgrade test: unmount-all triggers staged upgrade
New 'unmount-all-triggers-upgrade' scenario in upgrade-tests.yaml. Installs LKG, mounts, stages new version, then uses 'gvfs service --unmount-all' instead of per-repo unmount. Verifies the PendingUpgrade directory is consumed, confirming the new PendingUpgradeCheckRequest message works end-to-end. Assisted-by: Claude Opus 4.6 Signed-off-by: Tyrie Vella <tyrielv@gmail.com>
1 parent 7a1ba55 commit e33da2a

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

.github/workflows/upgrade-tests.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ jobs:
3333
- double-staging
3434
- staging-then-clean
3535
- mount-safety-deferral
36+
- unmount-all-triggers-upgrade
3637
fail-fast: false
3738

3839
steps:
@@ -274,6 +275,35 @@ jobs:
274275
Write-Host "PASS: Mount safety deferral works correctly"
275276
}
276277
278+
"unmount-all-triggers-upgrade" {
279+
Write-Host "=== Scenario: unmount-all triggers staged upgrade ==="
280+
# Install LKG, mount, staging upgrade, then unmount via
281+
# 'gvfs service --unmount-all' instead of 'gvfs unmount'.
282+
# --unmount-all skips the unregister message, so without the
283+
# PendingUpgradeCheckRequest fix the upgrade would never apply.
284+
Install-GVFS $lkgInstaller
285+
Assert-ServiceRunning
286+
$mountPid = Mount-TestRepo
287+
288+
Install-GVFS $newInstaller @("/STAGEIFMOUNTED=true")
289+
Assert-MountAlive $mountPid
290+
Assert-PendingUpgrade $true
291+
292+
# Unmount via --unmount-all (not per-repo unmount)
293+
& "$installDir\gvfs.exe" service --unmount-all 2>&1 | Write-Host
294+
if ($LASTEXITCODE -ne 0) { throw "unmount-all failed" }
295+
296+
# The deferred upgrade timer fires after ~5 seconds.
297+
# Wait for it to complete.
298+
$deadline = (Get-Date).AddSeconds(30)
299+
while ((Test-Path "$installDir\PendingUpgrade") -and (Get-Date) -lt $deadline) {
300+
Start-Sleep -Seconds 2
301+
}
302+
303+
Assert-PendingUpgrade $false
304+
Write-Host "PASS: unmount-all triggers staged upgrade"
305+
}
306+
277307
default {
278308
throw "Unknown scenario: ${{ matrix.scenario }}"
279309
}

0 commit comments

Comments
 (0)