Ejemplo n.º 1
0
 def test_version_json_docker(self):
     db = DockerBackend()
     db._inspect_image = MagicMock(return_value=_rhel_docker_inspect)
     img_obj = db.inspect_image('registry.access.redhat.com/rhel7')
     info = Info()
     info.get_layer_objects = MagicMock(return_value=img_obj.layers)
     args = self.Args()
     args.storage = 'docker'
     args.images = 'registry.access.redhat.com/rhel7'
     info.set_args(args)
     results = info.dbus_version()
     self.assertEqual(results, _rhel_version_json)
Ejemplo n.º 2
0
 def test_version_json_docker(self):
     db = DockerBackend()
     db._inspect_image = MagicMock(return_value=_rhel_docker_inspect)
     img_obj = db.inspect_image('registry.access.redhat.com/rhel7')
     info = Info()
     info.get_layer_objects = MagicMock(return_value=img_obj.layers)
     args = self.Args()
     args.storage = 'docker'
     args.images = 'registry.access.redhat.com/rhel7'
     info.set_args(args)
     results = info.dbus_version()
     self.assertEqual(results, _rhel_version_json)
Ejemplo n.º 3
0
 def test_version_json_ostree(self):
     ob = OSTreeBackend()
     ob.syscontainers.inspect_system_image = MagicMock(return_value=_rhel_ostree_inspect)
     img_obj = ob.inspect_image('registry.access.redhat.com/rhel7')
     info = Info()
     info.get_layer_objects = MagicMock(return_value=img_obj.layers)
     args = self.Args()
     args.storage = 'ostree'
     args.images = 'registry.access.redhat.com/rhel7'
     info.set_args(args)
     results = info.dbus_version()
     self.assertEqual(results, _rhel_ostree_json)
Ejemplo n.º 4
0
 def test_version_json_ostree(self):
     ob = OSTreeBackend()
     ob.syscontainers.inspect_system_image = MagicMock(return_value=_rhel_ostree_inspect)
     img_obj = ob.inspect_image('registry.access.redhat.com/rhel7')
     info = Info()
     info.get_layer_objects = MagicMock(return_value=img_obj.layers)
     args = self.Args()
     args.storage = 'ostree'
     args.images = 'registry.access.redhat.com/rhel7'
     info.set_args(args)
     results = info.dbus_version()
     self.assertEqual(results, _rhel_ostree_json)