ferm: fix race condition in integration test

curl sent the request faster then nginx bound the port in some cases

(cherry picked from commit 26dc4ab818)
Signed-off-by: Domen Kožar <domen@dev.si>
This commit is contained in:
Jörg Thalheim
2016-09-04 14:23:41 +02:00
committed by Domen Kožar
parent 2852b6e7b7
commit f95cf2d8c3

View File

@@ -54,6 +54,7 @@ import ./make-test.nix ({ pkgs, ...} : {
$client->waitForUnit("network.target");
$server->waitForUnit("ferm.service");
$server->waitForUnit("nginx.service");
$server->waitUntilSucceeds("ss -ntl | grep -q 80");
subtest "port 80 is allowed", sub {
$client->succeed("curl --fail -g http://192.168.1.1:80/status");