X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FN2VC.git;a=blobdiff_plain;f=tests%2Fbase.py;h=41fa191425a4e3476469bacfad74a1b8356a7400;hp=8b61461745889908fb4703391e19cc329c6d3f66;hb=7bf2f4d5ba51d8a6909a8709aeda200ddb153b03;hpb=85a4b210d2353ae209e3269498220febf0172270;ds=sidebyside diff --git a/tests/base.py b/tests/base.py index 8b61461..41fa191 100644 --- a/tests/base.py +++ b/tests/base.py @@ -25,8 +25,7 @@ here = os.path.dirname(os.path.realpath(__file__)) def is_bootstrapped(): result = subprocess.run(['juju', 'switch'], stdout=subprocess.PIPE) return ( - result.returncode == 0 and - len(result.stdout.decode().strip()) > 0) + result.returncode == 0 and len(result.stdout.decode().strip()) > 0) bootstrapped = pytest.mark.skipif( @@ -587,6 +586,9 @@ class TestN2VC(object): if not self.n2vc: self.n2vc = get_n2vc(loop=loop) + debug("Creating model for Network Service {}".format(self.ns_name)) + await self.n2vc.CreateNetworkService(self.ns_name) + application = self.n2vc.FormatApplicationName( self.ns_name, self.vnf_name, @@ -890,6 +892,8 @@ class TestN2VC(object): try: await self.n2vc.RemoveCharms(self.ns_name, application) + await self.n2vc.DestroyNetworkService(self.ns_name) + while True: # Wait for the application to be removed await asyncio.sleep(10)