Skip to content

Commit 4d65e88

Browse files
authored
Spliting dump request to add Query (#1909)
Spliting []dump into dumps, and editing the dump[1] to = req.URL.String(), so we can tests itens that depends on querys from the request.
1 parent 3bb4b7e commit 4d65e88

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

app.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ package fiber
99

1010
import (
1111
"bufio"
12+
"bytes"
1213
"crypto/tls"
1314
"crypto/x509"
1415
"errors"
@@ -974,6 +975,11 @@ func (app *App) Test(req *http.Request, msTimeout ...int) (resp *http.Response,
974975
return nil, err
975976
}
976977

978+
// adding back the query from URL, since dump cleans it
979+
dumps := bytes.Split(dump, []byte(" "))
980+
dumps[1] = []byte(req.URL.String())
981+
dump = bytes.Join(dumps, []byte(" "))
982+
977983
// Create test connection
978984
conn := new(testConn)
979985

0 commit comments

Comments
 (0)