tuning test to validate pipeline

Signed-off-by: quobix <dave@quobix.com>
This commit is contained in:
quobix
2023-11-22 13:06:00 -05:00
parent 44204b595e
commit 003eb37a3d

View File

@@ -107,20 +107,15 @@ func TestRolodex_FindNodeOrigin_ModifyLookup(t *testing.T) {
assert.Len(t, rolo.indexes, 4) assert.Len(t, rolo.indexes, 4)
// extract something that can only exist after resolution path := "$.paths./nested/files3.get.responses.200.content.application/json.schema"
path := "$.paths./nested/files3.get.responses.200.content.application/json.schema.properties.message.properties.utilMessage.properties.message.description"
yp, _ := yamlpath.NewPath(path) yp, _ := yamlpath.NewPath(path)
results, _ := yp.Find(node) results, _ := yp.Find(node)
// copy, modify, and try again // copy, modify, and try again
o := *results[0] o := *results[0]
o.Content = []*yaml.Node{ o.Content = []*yaml.Node{
{Value: "beer"}, {Value: "beer"}, {Value: "wine"}, {Value: "cake"}, {Value: "burgers"}, {Value: "herbs"}, {Value: "spices"},
}
results[0].Content = []*yaml.Node{
{Value: "wine"},
} }
origin := rolo.FindNodeOrigin(&o) origin := rolo.FindNodeOrigin(&o)
assert.Nil(t, origin) assert.Nil(t, origin)
} }