[yum-commits] Branch 'yum-3_2_X' - test/simpleupdatetests.py

James Antill james at osuosl.org
Mon Jul 27 15:06:55 UTC 2009


 test/simpleupdatetests.py |   17 +++++++++++++++++
 1 file changed, 17 insertions(+)

New commits:
commit 46cc5ddf4bd6660332a4da8bc9c1ce285aa9b8d5
Author: James Antill <james at and.org>
Date:   Mon Jul 27 09:25:44 2009 -0400

     Add testcase for old multiple arch conflicts problem.
    
     This was fixed a while ago, but the only testcase involves obsoletes too
    (testConflictMultiplePkgs).
     Bascially if we had two conflicts with the same resolution we'd fix
    the first one and then fail the second because we couldn't do anything.

diff --git a/test/simpleupdatetests.py b/test/simpleupdatetests.py
index 7307b5e..d543013 100644
--- a/test/simpleupdatetests.py
+++ b/test/simpleupdatetests.py
@@ -677,3 +677,20 @@ class SimpleUpdateTests(OperationsTests):
                                      [p11, pr12, py12])
         self.assert_(res=='ok', msg)
         self.assertResult((pi12,py12))
+
+    def testUpdateMultiArchConflict(self):
+        pi1 = FakePackage('A', '1', '1', '0', 'i386')
+        pi2 = FakePackage('B', '1', '1', '0', 'i386')
+        pi3 = FakePackage('B', '1', '1', '0', 'x86_64')
+
+        pa1 = FakePackage('A', '1', '2', '0', 'i386')
+        pa2 = FakePackage('B', '1', '2', '0', 'i386')
+        pa2.addConflicts('A', 'LE', ('0', '1', '1'))
+        pa3 = FakePackage('B', '1', '2', '0', 'x86_64')
+        pa3.addConflicts('A', 'LE', ('0', '1', '1'))
+
+        res, msg = self.runOperation(['update', 'B'],
+                                     [pi1, pi2, pi3],
+                                     [pa1, pa2, pa3])
+        self.assert_(res=='ok', msg)
+        self.assertResult((pa1, pa2, pa3))


More information about the Yum-commits mailing list