Document value access and focused inspection

This commit is contained in:
2026-11-21 04:16:46 +00:00
parent 37f38f3e54
commit 7a9ce01064
10 changed files with 78 additions and 10 deletions

View File

@@ -25,6 +25,10 @@ func TestComponentHandoff(t *testing.T) {
if runtime.Settings.Name != "example" || len(runtime.Settings.Entries) != 1 || runtime.Settings.Entries[0].ID != "default" || string(runtime.Resource) != "resource data" {
t.Fatalf("component runtime = %#v", runtime)
}
runtime.Settings.Entries[0].ID = "runtime change"
if result.Config.Component.Entries[0].ID != "default" {
t.Fatal("runtime settings share the result's slice")
}
entries, found := result.Metadata().Lookup(configkit.Keys("component", "entries"))
if !result.Metadata().IsExplicit(configkit.Keys("component", "resource")) || !found || entries.Origin.Layer != configkit.LayerUnderlay {
t.Fatal("presence did not retain source distinction")