Compare commits
1 commit
master
...
test-env-f
Author | SHA1 | Date | |
---|---|---|---|
ad4090e65a |
1 changed files with 6 additions and 4 deletions
|
@ -17,14 +17,14 @@ in (nixpkgs.lib.nixos.runTest {
|
||||||
ExecStartPre = "${legacyPackages.${system}.template_text {
|
ExecStartPre = "${legacyPackages.${system}.template_text {
|
||||||
name = "test";
|
name = "test";
|
||||||
text = ''
|
text = ''
|
||||||
public text
|
foo=${legacyPackages.${system}.fileContents secret_file}
|
||||||
${legacyPackages.${system}.fileContents secret_file}
|
|
||||||
'';
|
'';
|
||||||
outPath = "./test";
|
outPath = "./test";
|
||||||
}}/bin/test";
|
}}/bin/test";
|
||||||
|
environmentFile = "./test";
|
||||||
ExecStart = pkgs.writeScript "test_file_got_templates" ''
|
ExecStart = pkgs.writeScript "test_file_got_templates" ''
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
cat ./test | grep -q 'secret'
|
env > ./env
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -35,6 +35,8 @@ in (nixpkgs.lib.nixos.runTest {
|
||||||
start_all()
|
start_all()
|
||||||
print(machine.execute("uname -a"))
|
print(machine.execute("uname -a"))
|
||||||
machine.wait_for_unit("multi-user.target")
|
machine.wait_for_unit("multi-user.target")
|
||||||
print(machine.succeed("cat /test | grep -q secret"))
|
print(machine.succeed("cat /test"))
|
||||||
|
print(machine.succeed("cat /env"))
|
||||||
|
print(machine.succeed("cat /env | grep -q secret"))
|
||||||
'';
|
'';
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Reference in a new issue