Skip to content

Commit

Permalink
fix: hub_build_level test (#2189)
Browse files Browse the repository at this point in the history
* fix: hub test

* fix: catch exception

* fix: test pull image
  • Loading branch information
Yongxuanzhang committed Mar 17, 2021
1 parent f8ba303 commit 1e74ce6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/unit/docker/test_hub_build_level.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from jina.logging import JinaLogger
from jina.parsers.hub import set_hub_build_parser

cli = docker.APIClient(base_url='unix://var/run/docker.sock')
cur_dir = os.path.dirname(os.path.abspath(__file__))


Expand All @@ -28,10 +27,11 @@ def _filter_repo_tag(image, image_name='jinahub/pod.dummy_mwu_encoder'):
else:
return False

img_name = 'jinahub/pod.dummy_mwu_encoder:0.0.6'
client = docker.from_env()
client.images.pull(img_name)
images = client.images.list()
image_name = list(filter(lambda image: _filter_repo_tag(image), images))[0]

return image_name


Expand Down

0 comments on commit 1e74ce6

Please sign in to comment.