re-add table with migration status
This commit is contained in:
@@ -21,12 +21,10 @@
|
||||
roles.default.tags.all = { };
|
||||
roles.default.extraModules = [
|
||||
{
|
||||
|
||||
clan.core.postgresql.enable = true;
|
||||
clan.core.postgresql.users.test = { };
|
||||
clan.core.postgresql.databases.test.create.options.OWNER = "test";
|
||||
clan.core.settings.directory = ./.;
|
||||
|
||||
}
|
||||
];
|
||||
};
|
||||
@@ -36,15 +34,23 @@
|
||||
# TODO: Broken. Use instead of importer after fixing.
|
||||
# nodes.machine = { };
|
||||
|
||||
testScript = ''
|
||||
start_all()
|
||||
machine.wait_for_unit("postgresql")
|
||||
testScript =
|
||||
let
|
||||
runpg = "runuser -u postgres -- /run/current-system/sw/bin/psql";
|
||||
in
|
||||
''
|
||||
start_all()
|
||||
machine.wait_for_unit("postgresql")
|
||||
|
||||
# Create a test table
|
||||
machine.succeed("runuser -u postgres -- /run/current-system/sw/bin/psql -c 'CREATE TABLE test (id serial PRIMARY KEY);' test")
|
||||
machine.succeed("runuser -u postgres -- /run/current-system/sw/bin/psql -d test -c 'INSERT INTO test DEFAULT VALUES;'")
|
||||
machine.succeed("runuser -u postgres -- /run/current-system/sw/bin/psql -d test -c 'SELECT * FROM test;'")
|
||||
'';
|
||||
# Create a test table
|
||||
machine.succeed("${runpg} -c 'CREATE TABLE test (id serial PRIMARY KEY);' test")
|
||||
|
||||
# Insert valuesn
|
||||
machine.succeed("${runpg} -d test -c 'INSERT INTO test DEFAULT VALUES;'")
|
||||
|
||||
# Check that we can read them back
|
||||
machine.succeed("${runpg} -d test -c 'SELECT * FROM test;'")
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user