From: sinhan Date: Mon, 8 May 2017 14:41:48 +0000 (+0000) Subject: [RIFT 16413, 16414] Unittest failures fixed for utest_package, utest_publisher_dts X-Git-Tag: v2.0.1~12^2~1 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=135dc82de12705db88cf05be145191bdfc6fa957;p=osm%2FSO.git [RIFT 16413, 16414] Unittest failures fixed for utest_package, utest_publisher_dts Signed-off-by: sinhan --- diff --git a/rwlaunchpad/plugins/rwlaunchpadtasklet/rift/package/package.py b/rwlaunchpad/plugins/rwlaunchpadtasklet/rift/package/package.py index b4162811..2859b1be 100644 --- a/rwlaunchpad/plugins/rwlaunchpadtasklet/rift/package/package.py +++ b/rwlaunchpad/plugins/rwlaunchpadtasklet/rift/package/package.py @@ -613,7 +613,7 @@ class PackageChecksumValidator(object): archive_checksums = checksums.ArchiveChecksums.from_file_desc(checksum_hdl) except (FileNotFoundError, PackageError) as e: self._log.warning("Could not open package checksum file. Not validating checksums.") - return validated_file_checksums + return self.validated_file_checksums for pkg_file in package.files: if pkg_file == checksum_file: diff --git a/rwlaunchpad/plugins/rwpkgmgr/test/utest_publisher_dts.py b/rwlaunchpad/plugins/rwpkgmgr/test/utest_publisher_dts.py index 518b9276..6ec89d89 100755 --- a/rwlaunchpad/plugins/rwpkgmgr/test/utest_publisher_dts.py +++ b/rwlaunchpad/plugins/rwpkgmgr/test/utest_publisher_dts.py @@ -139,7 +139,7 @@ class TestCase(rift.test.dts.AbstractDTSTest): proxy = mock.MagicMock() url = "http://boson.eng.riftio.com/common/unittests/plantuml.jar" - url_downloader = downloader.PackageFileDownloader(url, "1", "/", "VNFD", proxy) + url_downloader = downloader.PackageFileDownloader(url, "1", "/", "VNFD", "SCRIPTS", "VNF_CONFIG", proxy) download_id = yield from self.job_handler.register_downloader(url_downloader) assert download_id is not None @@ -165,7 +165,7 @@ class TestCase(rift.test.dts.AbstractDTSTest): # Here, we are assuming that there is no HTTP server at 10.1.2.3 url = "http://10.1.2.3/common/unittests/plantuml.jar" - url_downloader = downloader.PackageFileDownloader(url, "1", "/", "VNFD", proxy) + url_downloader = downloader.PackageFileDownloader(url, "1", "/", "VNFD", "SCRIPTS", "VNF_CONFIG", proxy) download_id = yield from self.job_handler.register_downloader(url_downloader) assert download_id is not None @@ -191,7 +191,7 @@ class TestCase(rift.test.dts.AbstractDTSTest): proxy = mock.MagicMock() url = "http://boson.eng.riftio.com/common/unittests/Fedora-x86_64-20-20131211.1-sda-ping.qcow2" - url_downloader = downloader.PackageFileDownloader(url, "1", "/", "VNFD", proxy) + url_downloader = downloader.PackageFileDownloader(url, "1", "/", "VNFD", "SCRIPTS", "VNF_CONFIG", proxy) download_id = yield from self.job_handler.register_downloader(url_downloader) assert download_id is not None