def test_get_attached_filtered_bugs_problems(self): # Create event loop loop = asyncio.get_event_loop() # Initialize validator bv = BugValidator(self.runtime_fixture()) bv.product = "OpenShift Container Platform" bv.target_releases = ['4.5.0', '4.5.z'] # Login with errata tool loop.run_until_complete(bv.errata_api.login()) # Get attached bugs result = loop.run_until_complete(bv.get_attached_bugs([60089])) self.assertTrue(result, "Should find attached bugs") advisory_bugs = result[60089] # Filter bugs by release and product bv.filter_bugs_by_release(advisory_bugs, True) bv.filter_bugs_by_product(advisory_bugs) # Check validation problems self.assertTrue(bv.problems, "Should find version mismatch") self.assertTrue(any("1858981" in problem for problem in bv.problems), "Should find version mismatch for 1858981")
def test_get_attached_filtered_bugs(self): # Create event loop loop = asyncio.get_event_loop() # Initialize validator bv = BugValidator(self.runtime_fixture()) bv.product = "OpenShift Container Platform" bv.target_releases = ['4.5.0', '4.5.z'] # Login with errata tool loop.run_until_complete(bv.errata_api.login()) # Get attached bugs result = loop.run_until_complete(bv.get_attached_bugs([60089])) self.assertTrue(result, "Should find attached bugs") advisory_bugs = result[60089] # Filter bugs by release and product bugs = bv.filter_bugs_by_release(advisory_bugs) bugs = bv.filter_bugs_by_product(bugs) bug_ids = {bug.id for bug in bugs} # Check filtered bug IDs self.assertIn(1856529, bug_ids) # security tracker self.assertNotIn(1858981, bug_ids) # flaw bug