From: Andrew Schoen Date: Sun, 4 Dec 2016 02:01:30 +0000 (-0600) Subject: tests: return address and ansible vars from CephNode X-Git-Tag: v2.1.0~26^2~34 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=05be43c5460704afaec3afc0552182dcfe2742ec;p=ceph-ansible.git tests: return address and ansible vars from CephNode Signed-off-by: Andrew Schoen --- diff --git a/tests/conftest.py b/tests/conftest.py index a51f7d940..7611a62f5 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -2,12 +2,21 @@ import pytest @pytest.fixture() -def CephNode(Ansible, request): +def CephNode(Ansible, Interface, request): vars = Ansible.get_variables() node_type = vars["group_names"][0] if not request.node.get_marker(node_type): pytest.skip("Not a valid test for node type") + # I can assume eth1 because I know all the vagrant + # boxes we test with use that interface + address = Interface("eth1").addresses[0] + data = dict( + address=address, + vars=vars, + ) + return data + def pytest_collection_modifyitems(session, config, items): for item in items: