Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
feat(gateway): https support to uvicorn based servers (#3444)
* feat(gateway): https support to uvicorn based servers * style: fix overload and cli autocomplete Co-authored-by: Jina Dev Bot <dev-bot@jina.ai>
- Loading branch information
1 parent
4a5eee9
commit cb46192
Showing
10 changed files
with
244 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import argparse | ||
from jina.parsers.peapods.runtimes.remote import mixin_http_gateway_parser | ||
|
||
|
||
def test_runtime_parser(): | ||
parser = argparse.ArgumentParser( | ||
epilog=f'Test', description='Test Command Line Interface' | ||
) | ||
|
||
mixin_http_gateway_parser(parser) | ||
|
||
args = parser.parse_args([]) | ||
assert args.uvicorn_kwargs is None | ||
|
||
args = parser.parse_args(['--uvicorn-kwargs', 'ssl_keyfile: /tmp/cert.pem']) | ||
assert args.uvicorn_kwargs == {'ssl_keyfile': '/tmp/cert.pem'} | ||
|
||
args = parser.parse_args( | ||
[ | ||
'--uvicorn-kwargs', | ||
'ssl_keyfile: /tmp/cert.pem', | ||
'ssl_keyfile_password: 1234e', | ||
] | ||
) | ||
assert args.uvicorn_kwargs == { | ||
'ssl_keyfile': '/tmp/cert.pem', | ||
'ssl_keyfile_password': '1234e', | ||
} |
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