X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=rwlaunchpad%2Fra%2Fpytest%2Fns%2Fpingpong%2Ftest_pingpong_longevity.py;h=9f70febb9e3efce60f9d2fdac64876378dd59804;hb=f314b4af9744068a7ed7a6a6314220c3aa857523;hp=ff8fa967215490e19ded0031dc4806c00add449e;hpb=6f1a3fe149e4a6b9803382cb299c902f4cf58ec9;p=osm%2FSO.git diff --git a/rwlaunchpad/ra/pytest/ns/pingpong/test_pingpong_longevity.py b/rwlaunchpad/ra/pytest/ns/pingpong/test_pingpong_longevity.py index ff8fa967..9f70febb 100644 --- a/rwlaunchpad/ra/pytest/ns/pingpong/test_pingpong_longevity.py +++ b/rwlaunchpad/ra/pytest/ns/pingpong/test_pingpong_longevity.py @@ -18,11 +18,14 @@ # Creation Date: 2016/01/04 # +import gi import pytest -import rift.vcs.vcs import time -import gi +import rift.vcs.vcs + +gi.require_version('RwKeyspec', '1.0') +from gi.repository.RwKeyspec import quoted_key @pytest.fixture(scope='module') def rwnsr_proxy(mgmt_session): @@ -32,11 +35,11 @@ def test_launchpad_longevity(mgmt_session, mgmt_domain_name, rwnsr_proxy): time.sleep(60) rift.vcs.vcs.wait_until_system_started(mgmt_session) - nsr_opdata = rwnsr_proxy.get('/ns-instance-opdata') + nsr_opdata = rwnsr_proxy.get('/rw-project:project[rw-project:name="default"]/ns-instance-opdata') for nsr in nsr_opdata.nsr: - xpath = ("/ns-instance-opdata" - "/nsr[ns-instance-config-ref='%s']" - "/operational-status") % (nsr.ns_instance_config_ref) + xpath = ("/rw-project:project[rw-project:name='default']/ns-instance-opdata" + "/nsr[ns-instance-config-ref=%s]" + "/operational-status") % (quoted_key(nsr.ns_instance_config_ref)) operational_status = rwnsr_proxy.get(xpath) assert operational_status == 'running'