nixos/tests/croc: fix --pass argument and code passing
This commit is contained in:
parent
fc264c25c2
commit
cb097d74cc
@ -3,7 +3,7 @@ let
|
|||||||
client = { pkgs, ... }: {
|
client = { pkgs, ... }: {
|
||||||
environment.systemPackages = [ pkgs.croc ];
|
environment.systemPackages = [ pkgs.croc ];
|
||||||
};
|
};
|
||||||
pass = pkgs.writeText "pass" "PassRelay";
|
pass = "PassRelay";
|
||||||
in {
|
in {
|
||||||
name = "croc";
|
name = "croc";
|
||||||
meta = with pkgs.lib.maintainers; {
|
meta = with pkgs.lib.maintainers; {
|
||||||
@ -38,12 +38,12 @@ in {
|
|||||||
sender.execute("echo Hello World > testfile01.txt")
|
sender.execute("echo Hello World > testfile01.txt")
|
||||||
sender.execute("echo Hello Earth > testfile02.txt")
|
sender.execute("echo Hello Earth > testfile02.txt")
|
||||||
sender.execute(
|
sender.execute(
|
||||||
"croc --pass ${pass} --relay relay send --code topSecret testfile01.txt testfile02.txt >&2 &"
|
"env CROC_SECRET=topSecret croc --pass ${pass} --relay relay send testfile01.txt testfile02.txt >&2 &"
|
||||||
)
|
)
|
||||||
|
|
||||||
# receive the testfiles and check them
|
# receive the testfiles and check them
|
||||||
receiver.succeed(
|
receiver.succeed(
|
||||||
"croc --pass ${pass} --yes --relay relay topSecret"
|
"env CROC_SECRET=topSecret croc --pass ${pass} --yes --relay relay"
|
||||||
)
|
)
|
||||||
assert "Hello World" in receiver.succeed("cat testfile01.txt")
|
assert "Hello World" in receiver.succeed("cat testfile01.txt")
|
||||||
assert "Hello Earth" in receiver.succeed("cat testfile02.txt")
|
assert "Hello Earth" in receiver.succeed("cat testfile02.txt")
|
||||||
|
Loading…
Reference in New Issue
Block a user