src/tests/cli/t_pkg_list.py
changeset 1538 78ac66abc186
parent 1537 00a5b4d54eb8
child 1639 d8c628675154
--- a/src/tests/cli/t_pkg_list.py	Wed Dec 02 19:21:44 2009 -0600
+++ b/src/tests/cli/t_pkg_list.py	Wed Dec 02 22:07:06 2009 -0600
@@ -378,15 +378,19 @@
 
         def test_list_10_all_known_failed_refresh(self):
                 """Verify that a failed implicit refresh will not prevent pkg
-                list from working properly."""
+                list from working properly when appropriate."""
 
                 # Set test2's origin to an unreachable URI.
-                self.pkg("set-publisher --no-refresh -O http://test.invalid2 test2")
+                self.pkg("set-publisher --no-refresh -O http://test.invalid2 "
+                    "test2")
 
-                # Verify pkg list -a works as expected for both an unprivileged
-                # user and a privileged one when a publisher needs a refresh.
+                # Verify pkg list -a works as expected for an unprivileged user
+                # when a permissions failure is encountered.
                 self.pkg("list -a", su_wrap=True)
-                self.pkg("list -a")
+
+                # Verify pkg list -a fails for a privileged user when a
+                # publisher's repository is unreachable.
+                self.pkg("list -a", exit=1)
 
                 # Reset test2's origin.
                 durl2 = self.dcs[2].get_depot_url()