fix: Connection and Content-Type not found in postman-echo headers

Change-Id: Ieae673e12c7baabe231d7f3509bba18624d80431
This commit is contained in:
buyuxiang
2022-02-14 16:06:34 +08:00
parent ef5f071dbc
commit b1fdd4be71
5 changed files with 5 additions and 22 deletions

View File

@@ -58,12 +58,9 @@ func TestCaseExtractStepAssociation(t *testing.T) {
WithHeaders(map[string]string{"User-Agent": "$agent"}).
Extract().
WithJmesPath("status_code", "statusCode").
WithJmesPath("headers.\"Content-Type\"", "contentType").
WithJmesPath("body.args.foo1", "varFoo1").
Validate().
AssertEqual("$statusCode", 200, "check status code").
AssertEqual("headers.Connection", "keep-alive", "check header Connection").
AssertEqual("$contentType", "application/json; charset=utf-8", "check header Content-Type").
AssertEqual("$varFoo1", "bar1", "check args foo1").
AssertEqual("body.args.foo2", "bar2", "check args foo2").
AssertEqual("body.headers.\"user-agent\"", "HttpRunnerPlus", "check header user agent"),