X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=rwlaunchpad%2Fplugins%2Frwpkgmgr%2Ftest%2Futest_filesystem_proxy_dts.py;fp=rwlaunchpad%2Fplugins%2Frwpkgmgr%2Ftest%2Futest_filesystem_proxy_dts.py;h=6bc5bd4cf3e4e510aa34230c8a002ced672723d1;hb=f5c7fe708ca529648a252f4133af998794a6ce58;hp=75b310a1a9b2e74a7036cda8fcf59c13c4af6dc0;hpb=fed61ffa7e384fcbd6cc10e3c13fadb5a72c5434;p=osm%2FSO.git diff --git a/rwlaunchpad/plugins/rwpkgmgr/test/utest_filesystem_proxy_dts.py b/rwlaunchpad/plugins/rwpkgmgr/test/utest_filesystem_proxy_dts.py index 75b310a1..6bc5bd4c 100755 --- a/rwlaunchpad/plugins/rwpkgmgr/test/utest_filesystem_proxy_dts.py +++ b/rwlaunchpad/plugins/rwpkgmgr/test/utest_filesystem_proxy_dts.py @@ -66,11 +66,11 @@ class TestCase(rift.test.dts.AbstractDTSTest): "launchpad/packages/vnfd", uid) - package_path = os.path.join(path, "pong_vnfd") + asset_path = os.path.join(path, "icons") - os.makedirs(package_path) + os.makedirs(asset_path) open(os.path.join(path, "pong_vnfd.xml"), "wb").close() - open(os.path.join(path, "logo.png"), "wb").close() + open(os.path.join(asset_path, "logo.png"), "wb").close() return uid, path @@ -182,7 +182,8 @@ class TestCase(rift.test.dts.AbstractDTSTest): "package_type": "VNFD", "package_id": uid, "external_url": "https://raw.githubusercontent.com/RIFTIO/RIFT.ware/master/rift-shell", - "package_path": "icons/rift-shell"}) + "vnfd_file_type": "ICONS", + "package_path": "rift-shell"}) rpc_out = yield from self.dts.query_rpc( "I,/rw-pkg-mgmt:package-file-add", @@ -190,7 +191,7 @@ class TestCase(rift.test.dts.AbstractDTSTest): ip) yield from asyncio.sleep(5, loop=self.loop) - filepath = os.path.join(path, ip.package_path) + filepath = os.path.join(path, ip.vnfd_file_type.lower(), ip.package_path) assert os.path.isfile(filepath) mode = oct(os.stat(filepath)[stat.ST_MODE]) assert str(mode) == "0o100664" @@ -218,9 +219,10 @@ class TestCase(rift.test.dts.AbstractDTSTest): ip = RwPkgMgmtYang.YangInput_RwPkgMgmt_PackageFileDelete.from_dict({ "package_type": "VNFD", "package_id": uid, + "vnfd_file_type": "ICONS", "package_path": "logo.png"}) - assert os.path.isfile(os.path.join(path, ip.package_path)) + assert os.path.isfile(os.path.join(path, ip.vnfd_file_type.lower(), ip.package_path)) rpc_out = yield from self.dts.query_rpc( "I,/rw-pkg-mgmt:package-file-delete", @@ -228,7 +230,7 @@ class TestCase(rift.test.dts.AbstractDTSTest): ip) yield from asyncio.sleep(5, loop=self.loop) - assert not os.path.isfile(os.path.join(path, ip.package_path)) + assert not os.path.isfile(os.path.join(path, ip.vnfd_file_type.lower(), ip.package_path)) shutil.rmtree(path)