@@ -19,6 +19,7 @@ import (
1919 "testing"
2020 "time"
2121
22+ "context"
2223 "github.com/pb33f/libopenapi/utils"
2324 "github.com/stretchr/testify/assert"
2425 "gopkg.in/yaml.v3"
@@ -785,7 +786,7 @@ func TestSpecIndex_NoRoot(t *testing.T) {
785786 docs := index .ExtractExternalDocuments (nil )
786787 assert .Nil (t , docs )
787788 assert .Nil (t , refs )
788- assert .Nil (t , index .FindComponent ("nothing" ))
789+ assert .Nil (t , index .FindComponent (context . Background (), "nothing" ))
789790 assert .Equal (t , - 1 , index .GetOperationCount ())
790791 assert .Equal (t , - 1 , index .GetPathCount ())
791792 assert .Equal (t , - 1 , index .GetGlobalTagsCount ())
@@ -1037,10 +1038,10 @@ func TestSpecIndex_FindComponent_WithACrazyAssPath(t *testing.T) {
10371038
10381039 index := NewSpecIndexWithConfig (& rootNode , CreateOpenAPIIndexConfig ())
10391040 assert .Equal (t , "#/paths/~1crazy~1ass~1references/get/parameters/0" ,
1040- index .FindComponent ("#/paths/~1crazy~1ass~1references/get/responses/404/content/application~1xml;%20charset=utf-8/schema" ).Node .Content [1 ].Value )
1041+ index .FindComponent (context . Background (), "#/paths/~1crazy~1ass~1references/get/responses/404/content/application~1xml;%20charset=utf-8/schema" ).Node .Content [1 ].Value )
10411042
10421043 assert .Equal (t , "a param" ,
1043- index .FindComponent ("#/paths/~1crazy~1ass~1references/get/parameters/0" ).Node .Content [1 ].Value )
1044+ index .FindComponent (context . Background (), "#/paths/~1crazy~1ass~1references/get/parameters/0" ).Node .Content [1 ].Value )
10441045}
10451046
10461047func TestSpecIndex_FindComponent (t * testing.T ) {
@@ -1057,7 +1058,7 @@ func TestSpecIndex_FindComponent(t *testing.T) {
10571058 _ = yaml .Unmarshal ([]byte (yml ), & rootNode )
10581059
10591060 index := NewSpecIndexWithConfig (& rootNode , CreateOpenAPIIndexConfig ())
1060- assert .Nil (t , index .FindComponent ("I-do-not-exist" ))
1061+ assert .Nil (t , index .FindComponent (context . Background (), "I-do-not-exist" ))
10611062}
10621063
10631064func TestSpecIndex_TestPathsNodeAsArray (t * testing.T ) {
0 commit comments