Beispiel #1
0
 def test_ping(self):
     ri = discovery.RegistryInspect(registry=self.I_REGISTRY,
                                    repo=self.I_REPO,
                                    image=self.I_IMAGE,
                                    tag=self.I_TAG)
     # No exceptions should be raised
     ri.ping()
Beispiel #2
0
 def test_inspect(self):
     ri = discovery.RegistryInspect(registry=self.I_REGISTRY,
                                    repo=self.I_REPO,
                                    image=self.I_IMAGE,
                                    tag=self.I_TAG)
     inspect_info = ri.inspect()
     self.assertEqual(inspect_info['Name'], "{}/{}/{}".format(self.I_REGISTRY, self.I_REPO, self.I_IMAGE))
     self.assertEqual(inspect_info['Tag'], self.I_TAG)
Beispiel #3
0
 def test_find_image_on_registry(self):
     fq = 'docker.io/library/busybox:latest'
     for img in [
             'docker.io/library/busybox:latest',
             'docker.io/library/busybox', 'docker.io/busybox', 'busybox'
     ]:
         registry, repo, image, tag, _ = util.Decompose(img).all
         ri = discovery.RegistryInspect(registry=registry,
                                        repo=repo,
                                        image=image,
                                        tag=tag)
         self.assertEqual(ri.find_image_on_registry(), fq)