Ejemplo n.º 1
0
    def test_rpms_idempotency(self):
        # Test
        report = UpgradeStepReport()
        units._rpms(self.v1_test_db.database, self.tmp_test_db.database, report)
        result = units._rpms(self.v1_test_db.database, self.tmp_test_db.database, report)

        # Verify
        self.assertTrue(result)

        v1_rpms = self.v1_test_db.database.packages.find({'arch' : {'$ne' : 'src'}})
        v2_rpms = self.tmp_test_db.database.units_rpm.find()
        self.assertEqual(v1_rpms.count(), v2_rpms.count())

        self._assert_associations(self.tmp_test_db.database.units_rpm, 'rpm', {'arch' : {'$ne' : 'src'}})
Ejemplo n.º 2
0
    def test_rpms(self):
        # Test
        report = UpgradeStepReport()
        result = units._rpms(self.v1_test_db.database, self.tmp_test_db.database, report)

        # Verify
        self.assertTrue(result)

        v1_rpms = self.v1_test_db.database.packages.find({'arch' : {'$ne' : 'src'}}).sort('filename')
        self._assert_upgrade(v1_rpms)
        self._assert_associations(self.tmp_test_db.database.units_rpm, 'rpm', {'arch' : {'$ne' : 'src'}})
Ejemplo n.º 3
0
    def test_rpms(self):
        # Test
        report = UpgradeStepReport()
        result = units._rpms(self.v1_test_db.database, self.tmp_test_db.database, report)

        # Verify
        self.assertTrue(result)

        v1_rpms = self.v1_test_db.database.packages.find({"arch": {"$ne": "src"}}).sort("filename")
        self._assert_upgrade(v1_rpms)
        self._assert_associations(self.tmp_test_db.database.units_rpm, "rpm", {"arch": {"$ne": "src"}})