src/tests/cli/t_pkg_temp_sources.py
changeset 2690 11a8cae074e0
parent 2593 39deb6a29774
child 2701 55bf0cb749ae
--- a/src/tests/cli/t_pkg_temp_sources.py	Fri Jun 15 16:58:18 2012 -0700
+++ b/src/tests/cli/t_pkg_temp_sources.py	Mon Jul 11 13:49:50 2011 -0700
@@ -20,7 +20,9 @@
 # CDDL HEADER END
 #
 
-# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+#
+# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+#
 
 import testutils
 if __name__ == "__main__":
@@ -878,6 +880,27 @@
                 assert os.path.exists(vpath)
                 self.assertEqual(os.stat(vpath).st_size, 21)
 
+        def test_05_staged_execution(self):
+                """Verify that staged execution works with temporary
+                origins."""
+
+                # Create an image and verify no packages are known.
+                self.image_create(self.empty_rurl, prefix=None)
+                self.pkg("list -a", exit=1)
+
+                # Install an older version of a known package.
+                self.pkg("install -g %s [email protected]" % self.all_arc)
+                self.pkg("list [email protected] [email protected]")
+
+                # Verify that packages can be updated using temporary origins.
+                self.pkg("update --stage=plan -g %s -g %s" %
+                    (self.incorp_arc, self.quux_arc))
+                self.pkg("update --stage=prepare -g %s -g %s" %
+                    (self.incorp_arc, self.quux_arc))
+                self.pkg("update --stage=execute -g %s -g %s" %
+                    (self.incorp_arc, self.quux_arc))
+                self.pkg("list [email protected] [email protected]")
+
 
 if __name__ == "__main__":
         unittest.main()