Index resolution and origin membership
This commit is contained in:
@@ -122,6 +122,11 @@ func TestResolutionPreservesExplicitNullAndZeroWhileReplacingAbsentBaseline(t *t
|
||||
func TestResolutionCoalescesEqualAndRepeatedHelperIntent(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
parsedOther, err := ParsePath("/other")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
type config struct {
|
||||
Value int `yaml:"value"`
|
||||
Other int `yaml:"other"`
|
||||
@@ -130,8 +135,9 @@ func TestResolutionCoalescesEqualAndRepeatedHelperIntent(t *testing.T) {
|
||||
Defaults: func() config { return config{Value: 5} },
|
||||
Resolve: func(configuration *config, resolution *Resolution) error {
|
||||
Default(resolution, Keys("value"), &configuration.Value, 5, "equal derived intent", Keys("other"))
|
||||
Default(resolution, Keys("value"), &configuration.Value, 7, "updated derived intent", Keys("other"))
|
||||
Default(resolution, Keys("value"), &configuration.Value, 7, "updated derived intent", parsedOther)
|
||||
Normalize(resolution, Keys("value"), &configuration.Value, 7, "canonicalized value", Keys("other"))
|
||||
Normalize(resolution, Keys("value"), &configuration.Value, 7, "updated derived intent", parsedOther)
|
||||
return nil
|
||||
},
|
||||
}})
|
||||
|
||||
Reference in New Issue
Block a user