Migrate configuration tests to captured resources

This commit is contained in:
2026-11-21 14:29:06 +00:00
parent 74a77b3c32
commit 92e1e225b2
11 changed files with 164 additions and 165 deletions

View File

@@ -11,7 +11,7 @@ import (
)
func TestLoadedListsSortedEffectiveIdentities(t *testing.T) {
state, err := Load(mapping("identities", map[string]any{
state, err := load(mapping("identities", map[string]any{
"backends": []any{map[string]any{"id": "local", "endpoint": "http://localhost:8080/v1"}},
"collections": map[string]any{
"z": map[string]any{"profiles": []any{map[string]any{"id": "profile", "backend": "local", "model": "z-model"}}, "prompts": []any{listingPromptDefinition("prompt")}},
@@ -56,7 +56,7 @@ func TestLoadedListsSortedEffectiveIdentities(t *testing.T) {
}
func TestLoadedListsAreIndependent(t *testing.T) {
state, err := Load(mapping("identities", map[string]any{
state, err := load(mapping("identities", map[string]any{
"backends": []any{map[string]any{"id": "backend", "endpoint": "https://example.test/v1"}},
"profiles": []any{map[string]any{"id": "profile"}},
"prompts": []any{listingPromptDefinition("example")},
@@ -151,7 +151,7 @@ func TestLoadedListsSelectNamespaces(t *testing.T) {
}
func TestLoadedListsEmptyInventory(t *testing.T) {
state, err := Load(configkit.Input{Source: configkit.NoSource()}, nil)
state, err := load(configkit.Input{Source: configkit.NoSource()}, nil)
if err != nil {
t.Fatal(err)
}
@@ -170,7 +170,7 @@ func TestLoadedListsEmptyInventory(t *testing.T) {
}
func TestLoadedListsHonorCanceledContext(t *testing.T) {
state, err := Load(mapping("identities", map[string]any{
state, err := load(mapping("identities", map[string]any{
"profiles": []any{map[string]any{"id": "partial"}},
"prompts": []any{listingPromptDefinition("example")},
}), nil)