chore: add more content-type headers (#500)
Co-authored-by: rick <LinuxSuRen@users.noreply.github.com>
This commit is contained in:
parent
157253e9c3
commit
896197110f
|
@ -17,6 +17,7 @@ env:
|
|||
jobs:
|
||||
goreleaser:
|
||||
runs-on: ubuntu-22.04
|
||||
if: github.ref != 'refs/heads/master'
|
||||
steps:
|
||||
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
|
||||
- uses: ./tools/github-actions/setup-deps
|
||||
|
|
|
@ -2,6 +2,12 @@
|
|||
value: ""
|
||||
- key: Content-Type
|
||||
value: application/json
|
||||
- key: Content-Type
|
||||
value: application/json-patch+json
|
||||
- key: Content-Type
|
||||
value: application/merge-patch+json
|
||||
- key: Content-Type
|
||||
value: application/apply-patch+yaml
|
||||
- key: Content-Type
|
||||
value: application/x-www-form-urlencoded
|
||||
- key: Accept-Language
|
||||
|
|
|
@ -771,7 +771,7 @@ func (s *server) PopularHeaders(ctx context.Context, in *Empty) (pairs *Pairs, e
|
|||
Data: []*Pair{},
|
||||
}
|
||||
|
||||
err = yaml.Unmarshal([]byte(popularHeaders), &pairs.Data)
|
||||
err = yaml.Unmarshal(popularHeaders, &pairs.Data)
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -1009,7 +1009,7 @@ func (s *server) getLoaderByStoreName(storeName string) (loader testing.Writer,
|
|||
}
|
||||
|
||||
//go:embed data/headers.yaml
|
||||
var popularHeaders string
|
||||
var popularHeaders []byte
|
||||
|
||||
func findParentTestCases(testcase *testing.TestCase, suite *testing.TestSuite) (testcases []testing.TestCase) {
|
||||
reg, matchErr := regexp.Compile(`(.*?\{\{.*\.\w*.*?\}\})`)
|
||||
|
|
|
@ -599,7 +599,7 @@ func TestPopularHeaders(t *testing.T) {
|
|||
|
||||
pairs, err := server.PopularHeaders(ctx, &Empty{})
|
||||
if assert.NoError(t, err) {
|
||||
assert.Equal(t, 6, len(pairs.Data))
|
||||
assert.Equal(t, 9, len(pairs.Data))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue