nixos/tests/podman: refactor dns test and fix indentation
This commit is contained in:
parent
b53ab7f158
commit
9ab047538f
@ -135,17 +135,12 @@ import ../make-test-python.nix (
|
||||
with subtest("aardvark-dns"):
|
||||
dns.succeed("tar cv --files-from /dev/null | podman import - scratchimg")
|
||||
dns.succeed(
|
||||
"podman run -d --name=webserver -v /nix/store:/nix/store -v /run/current-system/sw/bin:/bin -w ${pkgs.writeTextDir "index.html" "<h1>Hi</h1>"} scratchimg ${pkgs.python3}/bin/python -m http.server 8000"
|
||||
"podman run -d --name=webserver -v /nix/store:/nix/store -v /run/current-system/sw/bin:/bin -w ${pkgs.writeTextDir "index.html" "<h1>Testing</h1>"} scratchimg ${pkgs.python3}/bin/python -m http.server 8000"
|
||||
)
|
||||
dns.succeed("podman ps | grep webserver")
|
||||
dns.succeed("""
|
||||
for i in `seq 0 120`; do
|
||||
podman run --rm --name=client -v /nix/store:/nix/store -v /run/current-system/sw/bin:/bin scratchimg ${pkgs.curl}/bin/curl http://webserver:8000 >/dev/console \
|
||||
&& exit 0
|
||||
sleep 0.5
|
||||
done
|
||||
exit 1
|
||||
""")
|
||||
dns.wait_until_succeeds(
|
||||
"podman run --rm --name=client -v /nix/store:/nix/store -v /run/current-system/sw/bin:/bin scratchimg ${pkgs.curl}/bin/curl http://webserver:8000 | grep Testing"
|
||||
)
|
||||
dns.succeed("podman stop webserver")
|
||||
dns.succeed("podman rm webserver")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user