def testPull(self): cSystem = ContainerSystem(cDir=self.cDir, mDir=self.mDir, forceImage=False) cSystem.pullAll([self.good_quay_url, self.bad_dh_url], 2) self.assertTrue(self.good_quay_url in cSystem.images) self.assertTrue(self.good_quay_url not in cSystem.invalid) self.assertTrue(self.bad_dh_url not in cSystem.images) self.assertTrue(self.bad_dh_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)
def testPullAll(self): cSystem = ContainerSystem(cDir=self.cDir, mDir=self.mDir, forceImage=False) cSystem.pullAll(self.urls, 4) #output = logStream.getvalue() #print(output) self.assertTrue(self.good_dh_url in cSystem.images) self.assertTrue(self.good_quay_url in cSystem.images) self.assertTrue(self.good_dh_url not in cSystem.invalid) self.assertTrue(self.good_quay_url not in cSystem.invalid) self.assertTrue(self.bad_dh_url not in cSystem.images) self.assertTrue(self.bad_quay_url not in cSystem.images) self.assertTrue(self.bad_dh_url in cSystem.invalid) self.assertTrue(self.bad_quay_url in cSystem.invalid)