nixosTests.docker-containers: Port to python

This commit is contained in:
Jacek Galowicz 2020-02-13 12:01:38 +01:00
parent 21b31c4e51
commit 967daec1ee

View File

@ -1,16 +1,13 @@
# Test Docker containers as systemd units
import ./make-test.nix ({ pkgs, lib, ... }:
{
import ./make-test-python.nix ({ pkgs, lib, ... }: {
name = "docker-containers";
meta = {
maintainers = with lib.maintainers; [ benley mkaito ];
};
nodes = {
docker = { pkgs, ... }:
{
docker = { pkgs, ... }: {
virtualisation.docker.enable = true;
docker-containers.nginx = {
@ -22,9 +19,9 @@ import ./make-test.nix ({ pkgs, lib, ... }:
};
testScript = ''
startAll;
$docker->waitForUnit("docker-nginx.service");
$docker->waitForOpenPort(8181);
$docker->waitUntilSucceeds("curl http://localhost:8181|grep Hello");
start_all()
docker.wait_for_unit("docker-nginx.service")
docker.wait_for_open_port(8181)
docker.wait_until_succeeds("curl http://localhost:8181 | grep Hello")
'';
})