From dd5bd95b1d7159b9fc760e16a9837bd46c23c177 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Sun, 19 May 2019 23:24:29 +0200 Subject: [PATCH] try to delay connection test --- molecule/ec2-centos-7/tests/test_default.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/molecule/ec2-centos-7/tests/test_default.py b/molecule/ec2-centos-7/tests/test_default.py index 3307194..8eebe33 100644 --- a/molecule/ec2-centos-7/tests/test_default.py +++ b/molecule/ec2-centos-7/tests/test_default.py @@ -16,6 +16,9 @@ def test_hassio_running_and_enabled(host): def test_hassio_socket(host): # Verify the socket is listening for HTTP traffic + for _ in range(30): + if host.socket("tcp://0.0.0.0:80").is_listening: + break + time.sleep(1) + assert host.socket("tcp://0.0.0.0:80").is_listening - -