コード例 #1
0
 def test_image(self):
     im1 = NspawnImage(repository=image_name, pull_policy=ImagePullPolicy.IF_NOT_PRESENT,
                       location=url)
     logger.debug("%s", im1)
     logger.debug("%s", im1.get_metadata())
     logger.debug("%s", im1.get_id())
     logger.debug("%s", im1.get_full_name())
コード例 #2
0
 def test_container_basic(self):
     im = NspawnImage(repository=image_name, pull_policy=ImagePullPolicy.IF_NOT_PRESENT,
                      location=url)
     cont = im.run_via_binary()
     logger.debug(im.get_metadata())
     logger.debug(cont.get_metadata())
     assert cont.is_running()
     assert cont.selfcheck()
     cont.stop()
     assert not cont.selfcheck()
     cont.start()
     assert cont.selfcheck()
     cont.stop()
     assert not cont.selfcheck()