]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
tests: update mgr dashboard socket listening test
authorDimitri Savineau <dsavinea@redhat.com>
Tue, 24 Mar 2020 18:28:51 +0000 (14:28 -0400)
committerDimitri Savineau <savineau.dimitri@gmail.com>
Mon, 6 Apr 2020 22:02:22 +0000 (18:02 -0400)
Since 15ed9ee the ceph-mgr daemon binds on the IP address on the public
network instead of binding on all addresses.
This commit updates the testinfra code to reflect that change.

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit 0f0a14772c21fbeadcc0c92b48a8c54ab8b729d6)

tests/functional/tests/mgr/test_mgr.py

index 2c4c0a387f1c01d7ed69fd23d4dab0303e26bf7c..49f28729ae1483ba3bbda5da820afe258b736f07 100644 (file)
@@ -25,8 +25,9 @@ class TestMGRs(object):
     @pytest.mark.parametrize('port', [
         '8443', '9283'
     ])
-    def test_mgr_dashboard_is_listening(self, node, host, port):
-        assert host.socket('tcp://%s' % port).is_listening
+    def test_mgr_dashboard_is_listening(self, node, host, setup, port):
+        s = host.socket('tcp://%s:%s' % (setup["address"], port))
+        assert s.is_listening
 
     def test_mgr_is_up(self, node, host, setup):
         hostname = node["vars"]["inventory_hostname"]