clan.core.state: wrap all commands in shell scripts

Otherwise we cannot execute them via ssh and also have nix store
dependencies.
This commit is contained in:
Jörg Thalheim
2024-06-19 11:42:14 +02:00
parent 117aed49e3
commit ef9ed1ebea
6 changed files with 117 additions and 31 deletions

View File

@@ -50,7 +50,7 @@
machine.succeed("""
set -x
${nodes.machine.clan.core.state.postgresql-test.postRestoreCommand}
${nodes.machine.clan.core.state.test.postRestoreCommand}
""")
machine.succeed("runuser -u postgres -- /run/current-system/sw/bin/psql -l >&2")
machine.succeed("runuser -u postgres -- /run/current-system/sw/bin/psql -d test -c '\dt' >&2")
@@ -66,7 +66,7 @@
# check if restore works if the database does not exist
machine.succeed("runuser -u postgres -- dropdb test")
machine.succeed("${nodes.machine.clanCore.state.postgresql-test.postRestoreCommand}")
machine.succeed("${nodes.machine.clan.core.state.test.postRestoreCommand}")
machine.succeed("runuser -u postgres -- /run/current-system/sw/bin/psql -d test -c '\dt' >&2")
'';
})