Files
coredesktop/smoketest/scenarios/44-low-disk.sh
T
david 2b85af286f
shellcheck / shellcheck (push) Failing after 17s
testing harness, coredesktop-dev
2026-11-04 09:39:46 -07:00

21 lines
517 B
Bash

#!/bin/bash
# shellcheck disable=SC2034
DESCRIPTION="update refuses to start with less than 10 GiB free, unless UPDATE_FORCE=1"
IMAGE=installed
TIER=pr
scenario() {
# Leave 5 GiB free on /
assert_vm "fill /" '
avail=$(df -k --output=avail / | tail -n 1 | tr -d " ")
sudo fallocate -l $(( (avail - 5 * 1024 * 1024) * 1024 )) /smoketest-fill'
cd_update
assert_status 1
assert_output "updating needs at least 10 GiB"
refute_output "Updating Arch..."
cd_update UPDATE_FORCE=1
assert_status 0
}