add postgresql backup hooks
This commit is contained in:
@@ -44,6 +44,7 @@
|
||||
zt-tcp-relay = import ./zt-tcp-relay nixosTestArgs;
|
||||
borgbackup = import ./borgbackup nixosTestArgs;
|
||||
syncthing = import ./syncthing nixosTestArgs;
|
||||
postgresql = import ./postgresql nixosTestArgs;
|
||||
wayland-proxy-virtwl = import ./wayland-proxy-virtwl nixosTestArgs;
|
||||
};
|
||||
|
||||
|
||||
22
checks/postgresql/default.nix
Normal file
22
checks/postgresql/default.nix
Normal file
@@ -0,0 +1,22 @@
|
||||
(import ../lib/container-test.nix) (
|
||||
{
|
||||
name = "postgresql";
|
||||
|
||||
nodes.machine = { self, ... }:
|
||||
{
|
||||
imports = [
|
||||
self.nixosModules.clanCore
|
||||
self.clanModules.postgresql
|
||||
self.clanModules.localbackup
|
||||
];
|
||||
clan.postgresl.databases = [ "test" ];
|
||||
clan.localbackup.targets.hdd.directory = "/mnt/external-disk";
|
||||
};
|
||||
testScript = ''
|
||||
start_all()
|
||||
machine.succeed("systemctl status postgresql")
|
||||
machine.wait_for_unit("postgresql")
|
||||
machine.succeed("localbackup-create")
|
||||
machine.succeed("ls -la /var/backups/postgresql")
|
||||
'';
|
||||
})
|
||||
Reference in New Issue
Block a user