[csw-devel] SF.net SVN: gar:[9898] csw/mgar/gar/v2/lib/python/package_checks_test.py
wahwah at users.sourceforge.net
wahwah at users.sourceforge.net
Mon May 17 10:32:07 CEST 2010
Revision: 9898
http://gar.svn.sourceforge.net/gar/?rev=9898&view=rev
Author: wahwah
Date: 2010-05-17 08:32:07 +0000 (Mon, 17 May 2010)
Log Message:
-----------
mGAR v2: checkpkg, a unit test for CheckDisallowedPaths
Modified Paths:
--------------
csw/mgar/gar/v2/lib/python/package_checks_test.py
Modified: csw/mgar/gar/v2/lib/python/package_checks_test.py
===================================================================
--- csw/mgar/gar/v2/lib/python/package_checks_test.py 2010-05-17 08:31:24 UTC (rev 9897)
+++ csw/mgar/gar/v2/lib/python/package_checks_test.py 2010-05-17 08:32:07 UTC (rev 9898)
@@ -531,5 +531,24 @@
self.pkg_data["basic_stats"]["pkgname"] = "CSWpy-foo"
+class TestCheckDisallowedPaths_1(CheckpkgUnitTestHelper, unittest.TestCase):
+ FUNCTION_NAME = "CheckDisallowedPaths"
+ def CheckpkgTest(self):
+ self.pkg_data["pkgmap"].append({
+ "class": "none",
+ "group": "bin",
+ "line": "doesn't matter here",
+ "mode": '0755',
+ "path": "/opt/csw/man",
+ "type": "f",
+ "user": "root"
+ })
+ self.error_mgr_mock.GetCommonPaths('sparc').AndReturn([])
+ self.error_mgr_mock.ReportError(
+ 'disallowed-path', 'opt/csw/man',
+ 'This path is already provided by CSWcommon '
+ 'or is not allowed for other reasons.')
+
+
if __name__ == '__main__':
unittest.main()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list