This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
# shellcheck disable=SC2034
|
||||
DESCRIPTION="a release with a new migration: it runs once, and is recorded"
|
||||
IMAGE=installed
|
||||
TIER=pr
|
||||
|
||||
scenario() {
|
||||
upstream_commit "Add a migration" '
|
||||
echo "echo ran >> ~/smoketest-migration" > "migrations/$(date +%s).sh"'
|
||||
|
||||
cd_update
|
||||
assert_status 0
|
||||
assert_output "Running migration"
|
||||
cd_update
|
||||
assert_status 0
|
||||
refute_output "Running migration"
|
||||
|
||||
assert_vm "the migration ran exactly once" '[ "$(cat ~/smoketest-migration)" = ran ]'
|
||||
assert_vm "the migration is recorded" '
|
||||
cd ~/.local/share/coredesktop/migrations
|
||||
for m in *.sh; do test -f ~/.local/state/coredesktop/migrations/$m; done'
|
||||
}
|
||||
Reference in New Issue
Block a user