Skip to content

Commit

Permalink
tests(utils): check return of get_query_arg
Browse files Browse the repository at this point in the history
  • Loading branch information
gszr committed Mar 13, 2024
1 parent 3ead421 commit 3327e20
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,10 @@ func (e *TestEnv) Handle(method string, args_d []byte) []byte {
e.noErr(proto.Unmarshal(args_d, &args))
u, err := url.Parse(e.ClientReq.Url)
e.noErr(err)
out = bridge.WrapString(u.Query()[args.V][0])
arg := u.Query()[args.V]
if len(arg) > 0 {
out = bridge.WrapString(arg[0])
}

case "kong.request.get_query":
u, err := url.Parse(e.ClientReq.Url)
Expand Down

0 comments on commit 3327e20

Please sign in to comment.