Skip to content

Commit eec4e98

Browse files
authored
fix : ignore request simulation for mocks captured from non http requests (#191)
Signed-off-by: deepto <[email protected]>
1 parent 640732a commit eec4e98

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

integrations/khttpclient/utils.go

+4
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ func MockRespFromYaml(kctx *internal.Context, logger *zap.Logger, req *http.Requ
4747
// determine the degree of match for all mocked http request in mock
4848
// array with current http call
4949
for i, j := range mocks {
50+
// If the Mock isn't of HTTP type, don't match it
51+
if j.Kind != string(models.HTTP) {
52+
continue
53+
}
5054
reqUrl, er := url.Parse(j.Spec.Req.URL)
5155
if er != nil {
5256
continue

0 commit comments

Comments
 (0)