diff options
author | worldofpeace <worldofpeace@protonmail.ch> | 2020-01-30 19:17:05 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-30 19:17:05 -0500 |
commit | e8e946a0602eb9cccbed41eb9d7e22786fe193aa (patch) | |
tree | a4535d64c2789637828dd19d80c671edac8aaf1b /nixos/tests | |
parent | b36f4c81dca4de0624b76d7cb1cb7d08f7b977df (diff) | |
parent | ad339ad44552fe42b4b3e6178f5103259ca4424a (diff) | |
download | nixlib-e8e946a0602eb9cccbed41eb9d7e22786fe193aa.tar nixlib-e8e946a0602eb9cccbed41eb9d7e22786fe193aa.tar.gz nixlib-e8e946a0602eb9cccbed41eb9d7e22786fe193aa.tar.bz2 nixlib-e8e946a0602eb9cccbed41eb9d7e22786fe193aa.tar.lz nixlib-e8e946a0602eb9cccbed41eb9d7e22786fe193aa.tar.xz nixlib-e8e946a0602eb9cccbed41eb9d7e22786fe193aa.tar.zst nixlib-e8e946a0602eb9cccbed41eb9d7e22786fe193aa.zip |
Merge pull request #76562 from nh2/graphite-test-python
nixosTests.graphite: port to python and mark as broken
Diffstat (limited to 'nixos/tests')
-rw-r--r-- | nixos/tests/graphite.nix | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/nixos/tests/graphite.nix b/nixos/tests/graphite.nix index 27a87bdbb9f2..ba3c73bb878d 100644 --- a/nixos/tests/graphite.nix +++ b/nixos/tests/graphite.nix @@ -1,6 +1,11 @@ -import ./make-test.nix ({ pkgs, ... } : +import ./make-test-python.nix ({ pkgs, ... } : { name = "graphite"; + meta = { + # Fails on dependency `python-2.7-Twisted`'s test suite + # complaining `ImportError: No module named zope.interface`. + broken = true; + }; nodes = { one = { ... }: { @@ -22,20 +27,20 @@ import ./make-test.nix ({ pkgs, ... } : }; testScript = '' - startAll; - $one->waitForUnit("default.target"); - $one->waitForUnit("graphiteWeb.service"); - $one->waitForUnit("graphiteApi.service"); - $one->waitForUnit("graphitePager.service"); - $one->waitForUnit("graphite-beacon.service"); - $one->waitForUnit("carbonCache.service"); - $one->waitForUnit("seyren.service"); + start_all() + one.wait_for_unit("default.target") + one.wait_for_unit("graphiteWeb.service") + one.wait_for_unit("graphiteApi.service") + one.wait_for_unit("graphitePager.service") + one.wait_for_unit("graphite-beacon.service") + one.wait_for_unit("carbonCache.service") + one.wait_for_unit("seyren.service") # The services above are of type "simple". systemd considers them active immediately # even if they're still in preStart (which takes quite long for graphiteWeb). # Wait for ports to open so we're sure the services are up and listening. - $one->waitForOpenPort(8080); - $one->waitForOpenPort(2003); - $one->succeed("echo \"foo 1 `date +%s`\" | nc -N localhost 2003"); - $one->waitUntilSucceeds("curl 'http://localhost:8080/metrics/find/?query=foo&format=treejson' --silent | grep foo >&2"); + one.wait_for_open_port(8080) + one.wait_for_open_port(2003) + one.succeed('echo "foo 1 `date +%s`" | nc -N localhost 2003') + one.wait_until_succeeds("curl 'http://localhost:8080/metrics/find/?query=foo&format=treejson' --silent | grep foo >&2") ''; }) |