Complete the ConfigKit resource migration
This commit is contained in:
@@ -360,6 +360,22 @@ func TestLoadRejectsMalformedHeadersAndLegacyResourceMappings(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestNestedConfigRemainsApplicationData(t *testing.T) {
|
||||
state, err := load(mapping("nested config", map[string]any{
|
||||
"config": map[string]any{},
|
||||
"profiles": []any{map[string]any{"id": "example", "extra_params": map[string]any{
|
||||
"config": map[string]any{"imports": "provider data"},
|
||||
}}},
|
||||
}), nil)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
profile, err := state.GetProfile(context.Background(), "example")
|
||||
if err != nil || profile.ResolvedTarget.ExtraParams["config"].(map[string]any)["imports"] != "provider data" {
|
||||
t.Fatalf("nested application data = %+v, %v", profile, err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestLoadConsumesAcceptedUnderlayVersionAndValidatesHeaderlessPayload(t *testing.T) {
|
||||
underlay := mapping("declared underlay", map[string]any{
|
||||
"version": int64(2),
|
||||
|
||||
Reference in New Issue
Block a user