mirror of
https://github.com/LukeHagar/libopenapi.git
synced 2025-12-10 04:20:24 +00:00
tuning test to validate pipeline
Signed-off-by: quobix <dave@quobix.com>
This commit is contained in:
@@ -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)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user