Skip to main content

Source code Changes To

pkg-gate / src / tests / cli / t_actuators.py

From revision 2916 to 2918:

diff -r 0ee0ea96dde6 -r ff3c422dd0e3 src/tests/cli/t_actuators.py
--- a/src/tests/cli/t_actuators.py	Thu Jul 18 09:38:51 2013 -0700
+++ b/src/tests/cli/t_actuators.py	Thu Jul 18 11:15:43 2013 -0700
@@ -29,7 +29,7 @@
 import os
 import pkg5unittest
 import unittest
-
+import stat
 class TestPkgSMFActuators(pkg5unittest.SingleDepotTestCase):
         # Only start/stop the depot once (instead of for every test)
         persistent_setup = True
@@ -569,7 +569,7 @@
         def test_release_note_7(self):
                 # check that multiple release notes are composited properly
                 self.pkg("install bar@1.0")
-                self.pkg("install -n hovercraft@1.0 baz@1.0")
+                self.pkg("install -v hovercraft@1.0 baz@1.0")
                 uni_out = unicode(self.output, "utf-8")
                 # we indent the release notes for readability, so a strict
                 # index or compare won't work unless we remove indenting
@@ -581,6 +581,23 @@
 
                 uni_out.index(self.multi_unicode)
                 uni_out.index(self.multi_ascii)
+
+		# repeat test using history to make sure everything is there.
+		# do as unpriv. user
+
+		self.pkg("history -n 1 -HN", su_wrap=True)
+                uni_out = unicode(self.output, "utf-8")
+                # we indent the release notes for readability, so a strict
+                # index or compare won't work unless we remove indenting
+                # this works for our test cases since they have no leading
+                # spaces
+
+                # removing indent
+                uni_out = "\n".join((n.lstrip() for n in uni_out.split("\n")))
+
+                uni_out.index(self.multi_unicode)
+                uni_out.index(self.multi_ascii)
+		
                 self.pkg("uninstall '*'")
 
         def test_release_note_8(self):
@@ -596,6 +613,9 @@
                 else:
                         assert "output file not found" == 0
 
+                # make sure file is readable by everyone
+                assert(stat.S_IMODE(os.stat(field).st_mode) == 0644)
+
                 # read release note file and check to make sure
                 # entire contents are there verbatim
                 release_note = unicode(file(field).read(), "utf-8")

 
 
Close
loading
Please Confirm
Close