mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-03 09:53:45 +00:00
fix: tests with new storage defaults
pass `None` to tests which assumed kv backends and such weren't previously available, since the defaults used to be None Signed-off-by: Charlie Doern <cdoern@redhat.com>
This commit is contained in:
parent
92945f4f4d
commit
b807042ac1
2 changed files with 26 additions and 3 deletions
|
|
@ -38,6 +38,9 @@ async def service():
|
|||
},
|
||||
stores=ServerStoresConfig(
|
||||
conversations=SqlStoreReference(backend="sql_test", table_name="openai_conversations"),
|
||||
metadata=None,
|
||||
inference=None,
|
||||
prompts=None,
|
||||
),
|
||||
)
|
||||
register_sqlstore_backends({"sql_test": storage.backends["sql_test"]})
|
||||
|
|
@ -142,6 +145,9 @@ async def test_policy_configuration():
|
|||
},
|
||||
stores=ServerStoresConfig(
|
||||
conversations=SqlStoreReference(backend="sql_test", table_name="openai_conversations"),
|
||||
metadata=None,
|
||||
inference=None,
|
||||
prompts=None,
|
||||
),
|
||||
)
|
||||
register_sqlstore_backends({"sql_test": storage.backends["sql_test"]})
|
||||
|
|
|
|||
|
|
@ -10,8 +10,9 @@ from unittest.mock import AsyncMock
|
|||
|
||||
import pytest
|
||||
|
||||
from llama_stack.core.datatypes import QualifiedModel, SafetyConfig, StackRunConfig, StorageConfig, VectorStoresConfig
|
||||
from llama_stack.core.datatypes import QualifiedModel, SafetyConfig, StackRunConfig, VectorStoresConfig
|
||||
from llama_stack.core.stack import validate_safety_config, validate_vector_stores_config
|
||||
from llama_stack.core.storage.datatypes import ServerStoresConfig, StorageConfig
|
||||
from llama_stack_api import Api, ListModelsResponse, ListShieldsResponse, Model, ModelType, Shield
|
||||
|
||||
|
||||
|
|
@ -21,7 +22,15 @@ class TestVectorStoresValidation:
|
|||
run_config = StackRunConfig(
|
||||
image_name="test",
|
||||
providers={},
|
||||
storage=StorageConfig(backends={}, stores={}),
|
||||
storage=StorageConfig(
|
||||
backends={},
|
||||
stores=ServerStoresConfig(
|
||||
metadata=None,
|
||||
inference=None,
|
||||
conversations=None,
|
||||
prompts=None,
|
||||
),
|
||||
),
|
||||
vector_stores=VectorStoresConfig(
|
||||
default_provider_id="faiss",
|
||||
default_embedding_model=QualifiedModel(
|
||||
|
|
@ -41,7 +50,15 @@ class TestVectorStoresValidation:
|
|||
run_config = StackRunConfig(
|
||||
image_name="test",
|
||||
providers={},
|
||||
storage=StorageConfig(backends={}, stores={}),
|
||||
storage=StorageConfig(
|
||||
backends={},
|
||||
stores=ServerStoresConfig(
|
||||
metadata=None,
|
||||
inference=None,
|
||||
conversations=None,
|
||||
prompts=None,
|
||||
),
|
||||
),
|
||||
vector_stores=VectorStoresConfig(
|
||||
default_provider_id="faiss",
|
||||
default_embedding_model=QualifiedModel(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue