Skip to content

Commit f822f84

Browse files
committed
test(offlinehttp): adjust haystack & needle in TestHTTPOperatorExtract
Signed-off-by: Dwi Siswanto <[email protected]>
1 parent ca6d97b commit f822f84

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/protocols/offlinehttp/operators_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ func TestHTTPOperatorExtract(t *testing.T) {
134134
event := request.responseToDSLMap(resp, host, matched, exampleRawRequest, exampleRawResponse, exampleResponseBody, exampleResponseHeader, 1*time.Second, map[string]interface{}{})
135135
require.Len(t, event, 14, "could not get correct number of items in dsl map")
136136
require.Equal(t, exampleRawResponse, event["response"], "could not get correct resp")
137-
require.Equal(t, "Test-Response", event["test-header"], "could not get correct resp for header")
137+
require.Equal(t, "Test-Response", event["test_header"], "could not get correct resp for header")
138138

139139
t.Run("extract", func(t *testing.T) {
140140
extractor := &extractors.Extractor{
@@ -153,7 +153,7 @@ func TestHTTPOperatorExtract(t *testing.T) {
153153
t.Run("kval", func(t *testing.T) {
154154
extractor := &extractors.Extractor{
155155
Type: extractors.ExtractorTypeHolder{ExtractorType: extractors.KValExtractor},
156-
KVal: []string{"test-header"},
156+
KVal: []string{"test_header"},
157157
Part: "header",
158158
}
159159
err = extractor.CompileExtractors()

0 commit comments

Comments
 (0)