mirror of
https://github.com/meta-llama/llama-stack.git
synced 2026-01-07 09:39:56 +00:00
test: add inspect unit test
Add test for the inspect endpoint. Signed-off-by: Sébastien Han <seb@redhat.com>
This commit is contained in:
parent
82e94fe22f
commit
aa6ca1ed5f
2 changed files with 29 additions and 0 deletions
5
tests/integration/inspect/__init__.py
Normal file
5
tests/integration/inspect/__init__.py
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||||
|
# All rights reserved.
|
||||||
|
#
|
||||||
|
# This source code is licensed under the terms described in the LICENSE file in
|
||||||
|
# the root directory of this source tree.
|
||||||
24
tests/integration/inspect/test_inspect.py
Normal file
24
tests/integration/inspect/test_inspect.py
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||||
|
# All rights reserved.
|
||||||
|
#
|
||||||
|
# This source code is licensed under the terms described in the LICENSE file in
|
||||||
|
# the root directory of this source tree.
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
from llama_stack_client import LlamaStackClient
|
||||||
|
|
||||||
|
from llama_stack import LlamaStackAsLibraryClient
|
||||||
|
|
||||||
|
|
||||||
|
class TestInspect:
|
||||||
|
@pytest.mark.asyncio
|
||||||
|
def test_health(self, llama_stack_client: LlamaStackAsLibraryClient | LlamaStackClient):
|
||||||
|
health = llama_stack_client.inspect.health()
|
||||||
|
assert health is not None
|
||||||
|
assert health.status == "OK"
|
||||||
|
|
||||||
|
@pytest.mark.asyncio
|
||||||
|
def test_version(self, llama_stack_client: LlamaStackAsLibraryClient | LlamaStackClient):
|
||||||
|
version = llama_stack_client.inspect.version()
|
||||||
|
assert version is not None
|
||||||
|
assert version.version is not None
|
||||||
Loading…
Add table
Add a link
Reference in a new issue