Tests: curl --fail
This commit is contained in:
parent
cfa65c56a6
commit
3bad85064b
1 changed files with 9 additions and 10 deletions
|
@ -40,7 +40,7 @@ in
|
||||||
virtualisation.memorySize = 1024;
|
virtualisation.memorySize = 1024;
|
||||||
};
|
};
|
||||||
testScript = ''
|
testScript = ''
|
||||||
machine.fail("curl localhost:8000")
|
machine.fail("curl --fail localhost:8000")
|
||||||
machine.succeed("docker --version")
|
machine.succeed("docker --version")
|
||||||
|
|
||||||
# Tests
|
# Tests
|
||||||
|
@ -51,11 +51,11 @@ in
|
||||||
machine.succeed(
|
machine.succeed(
|
||||||
"rm -rf work && cp -frT ${../../examples/minimal} work && cd work && NIX_PATH=nixpkgs='${pkgs.path}' arion up -d"
|
"rm -rf work && cp -frT ${../../examples/minimal} work && cd work && NIX_PATH=nixpkgs='${pkgs.path}' arion up -d"
|
||||||
)
|
)
|
||||||
machine.wait_until_succeeds("curl localhost:8000")
|
machine.wait_until_succeeds("curl --fail localhost:8000")
|
||||||
machine.succeed(
|
machine.succeed(
|
||||||
"cd work && NIX_PATH=nixpkgs='${pkgs.path}' arion down"
|
"cd work && NIX_PATH=nixpkgs='${pkgs.path}' arion down"
|
||||||
)
|
)
|
||||||
machine.wait_until_fails("curl localhost:8000")
|
machine.wait_until_fails("curl --fail localhost:8000")
|
||||||
|
|
||||||
# Tests
|
# Tests
|
||||||
# - arion exec
|
# - arion exec
|
||||||
|
@ -64,7 +64,7 @@ in
|
||||||
machine.succeed(
|
machine.succeed(
|
||||||
"rm -rf work && cp -frT ${../../examples/full-nixos} work && cd work && NIX_PATH=nixpkgs='${pkgs.path}' arion up -d"
|
"rm -rf work && cp -frT ${../../examples/full-nixos} work && cd work && NIX_PATH=nixpkgs='${pkgs.path}' arion up -d"
|
||||||
)
|
)
|
||||||
machine.wait_until_succeeds("curl localhost:8000")
|
machine.wait_until_succeeds("curl --fail localhost:8000")
|
||||||
|
|
||||||
machine.succeed(
|
machine.succeed(
|
||||||
"""
|
"""
|
||||||
|
@ -80,7 +80,7 @@ in
|
||||||
machine.succeed(
|
machine.succeed(
|
||||||
"cd work && NIX_PATH=nixpkgs='${pkgs.path}' arion down"
|
"cd work && NIX_PATH=nixpkgs='${pkgs.path}' arion down"
|
||||||
)
|
)
|
||||||
machine.wait_until_fails("curl localhost:8000")
|
machine.wait_until_fails("curl --fail localhost:8000")
|
||||||
|
|
||||||
# Tests
|
# Tests
|
||||||
# - examples/nixos-unit
|
# - examples/nixos-unit
|
||||||
|
@ -88,11 +88,11 @@ in
|
||||||
machine.succeed(
|
machine.succeed(
|
||||||
"rm -rf work && cp -frT ${../../examples/nixos-unit} work && cd work && NIX_PATH=nixpkgs='${pkgs.path}' arion up -d"
|
"rm -rf work && cp -frT ${../../examples/nixos-unit} work && cd work && NIX_PATH=nixpkgs='${pkgs.path}' arion up -d"
|
||||||
)
|
)
|
||||||
machine.wait_until_succeeds("curl localhost:8000")
|
machine.wait_until_succeeds("curl --fail localhost:8000")
|
||||||
machine.succeed(
|
machine.succeed(
|
||||||
"cd work && NIX_PATH=nixpkgs='${pkgs.path}' arion down"
|
"cd work && NIX_PATH=nixpkgs='${pkgs.path}' arion down"
|
||||||
)
|
)
|
||||||
machine.wait_until_fails("curl localhost:8000")
|
machine.wait_until_fails("curl --fail localhost:8000")
|
||||||
|
|
||||||
# Tests
|
# Tests
|
||||||
# - examples/traefik
|
# - examples/traefik
|
||||||
|
@ -101,11 +101,10 @@ in
|
||||||
machine.succeed(
|
machine.succeed(
|
||||||
"rm -rf work && cp -frT ${../../examples/traefik} work && cd work && NIX_PATH=nixpkgs='${pkgs.path}' arion up -d"
|
"rm -rf work && cp -frT ${../../examples/traefik} work && cd work && NIX_PATH=nixpkgs='${pkgs.path}' arion up -d"
|
||||||
)
|
)
|
||||||
machine.wait_until_succeeds("curl nix-docs.localhost")
|
machine.wait_until_succeeds("curl --fail nix-docs.localhost")
|
||||||
machine.succeed(
|
machine.succeed(
|
||||||
"cd work && NIX_PATH=nixpkgs='${pkgs.path}' arion down"
|
"cd work && NIX_PATH=nixpkgs='${pkgs.path}' arion down"
|
||||||
)
|
)
|
||||||
machine.wait_until_fails("curl nix-docs.localhost")
|
machine.wait_until_fails("curl --fail nix-docs.localhost")
|
||||||
|
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue