-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support jinaai executor scheme (#5515)
- Loading branch information
1 parent
b4f584b
commit 03ce8e8
Showing
12 changed files
with
143 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,22 @@ | ||
import pytest | ||
from hubble.executor.hubio import HubIO | ||
|
||
from jina.orchestrate.pods.factory import PodFactory | ||
from jina.parsers import set_pod_parser | ||
|
||
|
||
def test_container_pod(mocker, monkeypatch): | ||
@pytest.mark.parametrize( | ||
'uses', ['jinaai+docker://jina-ai/DummyExecutor'] | ||
) | ||
def test_container_pod(mocker, monkeypatch, uses): | ||
mock = mocker.Mock() | ||
|
||
def _mock_pull(self): | ||
return 'docker://jinahub/dummy_executor' | ||
|
||
monkeypatch.setattr(HubIO, 'pull', _mock_pull) | ||
|
||
args = set_pod_parser().parse_args(['--uses', 'jinahub+docker://DummyExecutor']) | ||
args = set_pod_parser().parse_args(['--uses', uses]) | ||
pod = PodFactory.build_pod(args) | ||
assert pod.args.uses == 'docker://jinahub/dummy_executor' | ||
assert pod.name == 'ContainerPod' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.