def testValidURLs(self): cSystem = ContainerSystem(cDir=self.cDir, mDir=self.mDir, forceImage=False) cSystem.validateURLs(self.urls) self.assertTrue(self.good_dh_url not in cSystem.invalid) self.assertTrue(self.bad_dh_url in cSystem.invalid) self.assertTrue(self.good_quay_url not in cSystem.invalid) self.assertTrue(self.bad_quay_url in cSystem.invalid)
def testPullForce(self): cSystem = ContainerSystem(cDir=self.cDir, mDir=self.mDir, forceImage=True) cSystem.validateURLs(self.urls) cSystem.pullAll(self.urls, 4) for url in self.good_urls: self.assertTrue(os.path.exists(cSystem.images[url])) self.assertTrue(url in cSystem.full_url) self.assertTrue(url in cSystem.keywords) for url in self.bad_urls: self.assertFalse(url in cSystem.images) self.assertFalse(url in cSystem.full_url) self.assertFalse(url in cSystem.keywords)