Skip to content

Commit af44eb7

Browse files
Merge branch 'master' of https://github.com/angshumanHalder/httpexpect into 191-migrate-from-float64-to-big.Float
2 parents ca0e087 + d0cfaf9 commit af44eb7

49 files changed

Lines changed: 3586 additions & 986 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build.yaml

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
name: build
22

33
on:
4+
workflow_dispatch:
5+
46
pull_request:
57
branches:
68
- master
79
- v*
8-
910
push:
1011
branches:
1112
- master
@@ -15,21 +16,22 @@ on:
1516

1617
jobs:
1718
build:
18-
runs-on: ubuntu-latest
19-
2019
strategy:
2120
matrix:
22-
go: [1.17, 1.x]
21+
go: [1.19, 1.x]
22+
os: [ubuntu-latest, windows-latest, macos-latest]
2323

24-
name: Go ${{ matrix.go }}
24+
runs-on: ${{ matrix.os }}
25+
name: Go ${{ matrix.go }} ${{ matrix.os }}
2526
steps:
2627
- name: Checkout
2728
uses: actions/checkout@v3
2829

2930
- name: Install Go
30-
uses: actions/setup-go@v3
31+
uses: actions/setup-go@v4.0.1
3132
with:
3233
go-version: ${{ matrix.go }}
34+
cache: true
3335

3436
- name: Build
3537
run: go get -v ./...
@@ -38,17 +40,21 @@ jobs:
3840
run: go test ./...
3941

4042
examples:
41-
runs-on: ubuntu-latest
43+
strategy:
44+
matrix:
45+
os: [ubuntu-latest, windows-latest, macos-latest]
4246

43-
name: Examples
47+
runs-on: ${{ matrix.os }}
48+
name: Examples ${{ matrix.os }}
4449
steps:
4550
- name: Checkout
4651
uses: actions/checkout@v3
4752

4853
- name: Install Go
49-
uses: actions/setup-go@v3
54+
uses: actions/setup-go@v4.0.1
5055
with:
5156
go-version: 1.x
57+
cache: true
5258

5359
- name: Build
5460
run: cd _examples && go get -v .
@@ -104,15 +110,18 @@ jobs:
104110
uses: actions/checkout@v3
105111

106112
- name: Install Go
107-
uses: actions/setup-go@v3
113+
uses: actions/setup-go@v4.0.1
108114
with:
109115
go-version: 1.x
116+
cache: false
110117

111118
- name: Run linters
112119
uses: golangci/golangci-lint-action@v3
120+
timeout-minutes: 20
113121
with:
114-
version: v1.51.2
122+
version: v1.54.2
115123
working-directory: ${{ matrix.dir }}
124+
args: --timeout=20m
116125

117126
coverage:
118127
runs-on: ubuntu-latest
@@ -124,9 +133,10 @@ jobs:
124133
uses: actions/checkout@v3
125134

126135
- name: Install Go
127-
uses: actions/setup-go@v3
136+
uses: actions/setup-go@v4.0.1
128137
with:
129138
go-version: 1.x
139+
cache: true
130140

131141
- name: Run tests
132142
run: go test -covermode=count -coverprofile=coverage.out -coverpkg=. ./...

.golangci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ linters:
1515
linters-settings:
1616
lll:
1717
line-length: 90
18+
revive:
19+
rules:
20+
- name: unused-parameter
21+
disabled: true
1822

1923
issues:
2024
exclude-rules:

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ all: tidy gen build lint test spell
33
tidy:
44
go mod tidy -v
55
cd _examples && go get -v -u github.com/gavv/httpexpect/v2
6-
cd _examples && go mod tidy -v
6+
cd _examples && go mod tidy -v -compat=1.17
77

88
gen:
99
go generate ./...

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Workflow:
4848
* Failures are reported using [`testify`](https://github.com/stretchr/testify/) (`assert` or `require` package) or standard `testing` package.
4949
* JSON values are pretty-printed using `encoding/json`, Go values are pretty-printed using [`litter`](https://github.com/sanity-io/litter).
5050
* Dumping requests and responses in various formats, using [`httputil`](https://golang.org/pkg/net/http/httputil/), [`http2curl`](https://github.com/moul/http2curl), or simple compact logger.
51-
* Color support using [`fatih/color`](github.com/fatih/color).
51+
* Color support using [`fatih/color`](https://github.com/fatih/color).
5252

5353
##### Tuning
5454

@@ -359,12 +359,12 @@ m := e.GET("/users/john").
359359
Expect().
360360
Header("Location").Match("http://(?P<host>.+)/users/(?P<user>.+)")
361361

362-
m.Index(0).IsEqual("http://example.com/users/john")
363-
m.Index(1).IsEqual("example.com")
364-
m.Index(2).IsEqual("john")
362+
m.Submatch(0).IsEqual("http://example.com/users/john")
363+
m.Submatch(1).IsEqual("example.com")
364+
m.Submatch(2).IsEqual("john")
365365

366-
m.Name("host").IsEqual("example.com")
367-
m.Name("user").IsEqual("john")
366+
m.NamedSubmatch("host").IsEqual("example.com")
367+
m.NamedSubmatch("user").IsEqual("john")
368368
```
369369

370370
##### Redirection support

_examples/go.mod

Lines changed: 44 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -5,70 +5,80 @@ go 1.17
55
require (
66
github.com/dgrijalva/jwt-go v3.2.0+incompatible
77
github.com/fasthttp/websocket v1.5.0
8-
github.com/gavv/httpexpect/v2 v2.15.0
9-
github.com/gin-gonic/gin v1.8.1
8+
github.com/gavv/httpexpect/v2 v2.16.0
9+
github.com/gin-gonic/gin v1.9.1
1010
github.com/go-oauth2/oauth2/v4 v4.5.1
1111
github.com/gorilla/websocket v1.5.0
12-
github.com/kataras/iris/v12 v12.1.8
12+
github.com/kataras/iris/v12 v12.2.0
1313
github.com/labstack/echo/v4 v4.10.0
14-
github.com/valyala/fasthttp v1.45.0
14+
github.com/valyala/fasthttp v1.50.0
1515
golang.org/x/oauth2 v0.4.0
1616
google.golang.org/appengine v1.6.7
1717
)
1818

1919
require (
2020
github.com/BurntSushi/toml v1.2.1 // indirect
2121
github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53 // indirect
22-
github.com/CloudyKit/jet/v3 v3.0.1 // indirect
22+
github.com/CloudyKit/jet/v6 v6.2.0 // indirect
23+
github.com/Joker/jade v1.1.3 // indirect
2324
github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06 // indirect
25+
github.com/TylerBrock/colorjson v0.0.0-20200706003622-8a50f05110d2 // indirect
2426
github.com/ajg/form v1.5.1 // indirect
2527
github.com/andybalholm/brotli v1.0.5 // indirect
2628
github.com/aymerick/douceur v0.2.0 // indirect
27-
github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible // indirect
29+
github.com/bytedance/sonic v1.9.1 // indirect
30+
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect
2831
github.com/davecgh/go-spew v1.1.1 // indirect
2932
github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385 // indirect
3033
github.com/fatih/color v1.15.0 // indirect
3134
github.com/fatih/structs v1.1.0 // indirect
35+
github.com/flosch/pongo2/v4 v4.0.2 // indirect
36+
github.com/gabriel-vasile/mimetype v1.4.2 // indirect
3237
github.com/gin-contrib/sse v0.1.0 // indirect
33-
github.com/go-playground/locales v0.14.0 // indirect
34-
github.com/go-playground/universal-translator v0.18.0 // indirect
35-
github.com/go-playground/validator/v10 v10.11.1 // indirect
38+
github.com/go-playground/locales v0.14.1 // indirect
39+
github.com/go-playground/universal-translator v0.18.1 // indirect
40+
github.com/go-playground/validator/v10 v10.14.0 // indirect
3641
github.com/gobwas/glob v0.2.3 // indirect
37-
github.com/goccy/go-json v0.9.11 // indirect
42+
github.com/goccy/go-json v0.10.2 // indirect
3843
github.com/golang-jwt/jwt v3.2.2+incompatible // indirect
3944
github.com/golang/protobuf v1.5.2 // indirect
45+
github.com/golang/snappy v0.0.4 // indirect
4046
github.com/google/go-querystring v1.1.0 // indirect
4147
github.com/google/uuid v1.3.0 // indirect
4248
github.com/gorilla/css v1.0.0 // indirect
4349
github.com/imkira/go-interpol v1.1.0 // indirect
44-
github.com/iris-contrib/blackfriday v2.0.0+incompatible // indirect
45-
github.com/iris-contrib/go.uuid v2.0.0+incompatible // indirect
46-
github.com/iris-contrib/jade v1.1.4 // indirect
47-
github.com/iris-contrib/pongo2 v0.0.1 // indirect
4850
github.com/iris-contrib/schema v0.0.6 // indirect
51+
github.com/josharian/intern v1.0.0 // indirect
4952
github.com/json-iterator/go v1.1.12 // indirect
53+
github.com/kataras/blocks v0.0.7 // indirect
5054
github.com/kataras/golog v0.1.8 // indirect
5155
github.com/kataras/pio v0.0.11 // indirect
5256
github.com/kataras/sitemap v0.0.6 // indirect
53-
github.com/klauspost/compress v1.16.4 // indirect
57+
github.com/kataras/tunnel v0.0.4 // indirect
58+
github.com/klauspost/compress v1.17.0 // indirect
59+
github.com/klauspost/cpuid/v2 v2.2.4 // indirect
5460
github.com/labstack/gommon v0.4.0 // indirect
55-
github.com/leodido/go-urn v1.2.1 // indirect
61+
github.com/leodido/go-urn v1.2.4 // indirect
62+
github.com/mailgun/raymond/v2 v2.0.48 // indirect
63+
github.com/mailru/easyjson v0.7.7 // indirect
5664
github.com/mattn/go-colorable v0.1.13 // indirect
57-
github.com/mattn/go-isatty v0.0.18 // indirect
58-
github.com/microcosm-cc/bluemonday v1.0.21 // indirect
65+
github.com/mattn/go-isatty v0.0.19 // indirect
66+
github.com/microcosm-cc/bluemonday v1.0.23 // indirect
5967
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
6068
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
6169
github.com/modern-go/reflect2 v1.0.2 // indirect
62-
github.com/pelletier/go-toml/v2 v2.0.6 // indirect
70+
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
6371
github.com/pmezard/go-difflib v1.0.0 // indirect
64-
github.com/ryanuber/columnize v2.1.2+incompatible // indirect
72+
github.com/russross/blackfriday/v2 v2.1.0 // indirect
6573
github.com/sanity-io/litter v1.5.5 // indirect
6674
github.com/savsgio/gotils v0.0.0-20220530130905-52f3993e8d6d // indirect
6775
github.com/schollz/closestmatch v2.1.0+incompatible // indirect
6876
github.com/sergi/go-diff v1.3.1 // indirect
69-
github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect
77+
github.com/sirupsen/logrus v1.8.1 // indirect
7078
github.com/smartystreets/goconvey v1.7.2 // indirect
71-
github.com/stretchr/testify v1.8.2 // indirect
79+
github.com/stretchr/testify v1.8.4 // indirect
80+
github.com/tdewolff/minify/v2 v2.12.4 // indirect
81+
github.com/tdewolff/parse/v2 v2.6.4 // indirect
7282
github.com/tidwall/btree v0.0.0-20191029221954-400434d76274 // indirect
7383
github.com/tidwall/buntdb v1.1.2 // indirect
7484
github.com/tidwall/gjson v1.12.1 // indirect
@@ -77,23 +87,27 @@ require (
7787
github.com/tidwall/pretty v1.2.0 // indirect
7888
github.com/tidwall/rtree v0.0.0-20180113144539-6cd427091e0e // indirect
7989
github.com/tidwall/tinyqueue v0.0.0-20180302190814-1e39f5511563 // indirect
80-
github.com/ugorji/go/codec v1.2.7 // indirect
90+
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
91+
github.com/ugorji/go/codec v1.2.11 // indirect
8192
github.com/valyala/bytebufferpool v1.0.0 // indirect
8293
github.com/valyala/fasttemplate v1.2.2 // indirect
94+
github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect
95+
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
8396
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
8497
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
8598
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
8699
github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0 // indirect
100+
github.com/yosssi/ace v0.0.5 // indirect
87101
github.com/yudai/gojsondiff v1.0.0 // indirect
88102
github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 // indirect
89-
golang.org/x/crypto v0.7.0 // indirect
90-
golang.org/x/net v0.9.0 // indirect
91-
golang.org/x/sys v0.7.0 // indirect
92-
golang.org/x/text v0.9.0 // indirect
93-
golang.org/x/time v0.2.0 // indirect
94-
google.golang.org/protobuf v1.28.1 // indirect
103+
golang.org/x/arch v0.3.0 // indirect
104+
golang.org/x/crypto v0.17.0 // indirect
105+
golang.org/x/net v0.17.0 // indirect
106+
golang.org/x/sys v0.15.0 // indirect
107+
golang.org/x/text v0.14.0 // indirect
108+
golang.org/x/time v0.3.0 // indirect
109+
google.golang.org/protobuf v1.30.0 // indirect
95110
gopkg.in/ini.v1 v1.67.0 // indirect
96-
gopkg.in/yaml.v2 v2.4.0 // indirect
97111
gopkg.in/yaml.v3 v3.0.1 // indirect
98112
moul.io/http2curl/v2 v2.3.0 // indirect
99113
)

0 commit comments

Comments
 (0)