Document value access and focused inspection
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user