Migrate configuration tests to captured resources
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user