Skip to content

Commit 7bc7cd4

Browse files
ibizamanibizaman
ibizaman
authored andcommitted
refactor extraScript in tests
1 parent b776bd0 commit 7bc7cd4

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

test/common.nix

+7-9
Original file line numberDiff line numberDiff line change
@@ -96,17 +96,15 @@ let
9696
script = extraScript args;
9797
indent = i: str: lib.concatMapStringsSep "\n" (x: (lib.strings.replicate i " ") + x) (lib.splitString "\n" script);
9898
in
99-
lib.optionalString (script != "") ''
100-
with subtest("extraScript"):
101-
${indent 4 script}
102-
''));
99+
lib.optionalString (script != "") script)
100+
);
103101

104102
backupScript = args: (accessScript args).override {
105-
extraScript = { proto_fqdn, ... }: ''
106-
with subtest("backup"):
107-
server.succeed("systemctl start restic-backups-testinstance_opt_repos_A")
108-
'';
109-
};
103+
extraScript = { proto_fqdn, ... }: ''
104+
with subtest("backup"):
105+
server.succeed("systemctl start restic-backups-testinstance_opt_repos_A")
106+
'';
107+
};
110108
in
111109
{
112110
inherit baseImports accessScript;

0 commit comments

Comments
 (0)