refactor extraScript in tests
This commit is contained in:
parent
b776bd07bc
commit
7bc7cd49cf
1 changed files with 7 additions and 9 deletions
|
|
@ -96,17 +96,15 @@ let
|
|||
script = extraScript args;
|
||||
indent = i: str: lib.concatMapStringsSep "\n" (x: (lib.strings.replicate i " ") + x) (lib.splitString "\n" script);
|
||||
in
|
||||
lib.optionalString (script != "") ''
|
||||
with subtest("extraScript"):
|
||||
${indent 4 script}
|
||||
''));
|
||||
lib.optionalString (script != "") script)
|
||||
);
|
||||
|
||||
backupScript = args: (accessScript args).override {
|
||||
extraScript = { proto_fqdn, ... }: ''
|
||||
with subtest("backup"):
|
||||
server.succeed("systemctl start restic-backups-testinstance_opt_repos_A")
|
||||
'';
|
||||
};
|
||||
extraScript = { proto_fqdn, ... }: ''
|
||||
with subtest("backup"):
|
||||
server.succeed("systemctl start restic-backups-testinstance_opt_repos_A")
|
||||
'';
|
||||
};
|
||||
in
|
||||
{
|
||||
inherit baseImports accessScript;
|
||||
|
|
|
|||
Loading…
Reference in a new issue