[csw-devel] SF.net SVN: gar:[11811] csw/mgar/gar/v2/lib/python/package_checks_test.py
wahwah at users.sourceforge.net
wahwah at users.sourceforge.net
Mon Dec 6 16:21:54 CET 2010
Revision: 11811
http://gar.svn.sourceforge.net/gar/?rev=11811&view=rev
Author: wahwah
Date: 2010-12-06 15:21:53 +0000 (Mon, 06 Dec 2010)
Log Message:
-----------
checkpkg: A unit test for regular doc files
They can be placed outside the /opt/csw/share/doc/<catalogname>/
directory. Only license files must be there.
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-12-06 15:20:00 UTC (rev 11810)
+++ csw/mgar/gar/v2/lib/python/package_checks_test.py 2010-12-06 15:21:53 UTC (rev 11811)
@@ -1445,18 +1445,14 @@
'soname=libneon.so.27 filename=foo.so.1')
-class TestCheckDocDir(CheckpkgUnitTestHelper, unittest.TestCase):
+class TestCheckDocDirLicense(CheckpkgUnitTestHelper, unittest.TestCase):
FUNCTION_NAME = 'CheckDocDir'
def CheckpkgTest(self):
self.pkg_data = neon_stats[0]
self.pkg_data["pkgmap"].append({
- "class": "none",
- "group": "bin",
- "line": "",
- "mode": '0755',
+ "class": "none", "type": "f", "line": "",
+ "user": "root", "group": "bin", "mode": '0755',
"path": "/opt/csw/share/doc/alien/license",
- "type": "f",
- "user": "root"
})
self.error_mgr_mock.ReportError(
'wrong-docdir',
@@ -1464,5 +1460,17 @@
'in-package=/opt/csw/share/doc/alien/license')
+class TestCheckDocDirRandomFile(CheckpkgUnitTestHelper, unittest.TestCase):
+ "A random file should not trigger the message; only license files."
+ FUNCTION_NAME = 'CheckDocDir'
+ def CheckpkgTest(self):
+ self.pkg_data = neon_stats[0]
+ self.pkg_data["pkgmap"].append({
+ "class": "none", "type": "f", "line": "",
+ "user": "root", "group": "bin", "mode": '0755',
+ "path": "/opt/csw/share/doc/alien/random_file",
+ })
+
+
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