Fix http_listener_v2 tests

This commit is contained in:
Daniel Nelson 2019-06-17 16:20:09 -07:00
parent 4199114e4c
commit 9f3c1c6ec7
No known key found for this signature in database
GPG Key ID: CAAD59C9444F6155
1 changed files with 2 additions and 3 deletions

View File

@ -16,7 +16,6 @@ import (
"github.com/influxdata/telegraf/internal" "github.com/influxdata/telegraf/internal"
"github.com/influxdata/telegraf/plugins/parsers" "github.com/influxdata/telegraf/plugins/parsers"
"github.com/influxdata/telegraf/testutil" "github.com/influxdata/telegraf/testutil"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
) )
@ -379,7 +378,7 @@ func TestWriteHTTPEmpty(t *testing.T) {
} }
func TestWriteHTTPQueryParams(t *testing.T) { func TestWriteHTTPQueryParams(t *testing.T) {
parser, _ := parsers.NewFormDataParser("query_measurement", nil, []string{"tagKey"}) parser, _ := parsers.NewFormUrlencodedParser("query_measurement", nil, []string{"tagKey"})
listener := newTestHTTPListenerV2() listener := newTestHTTPListenerV2()
listener.DataSource = "query" listener.DataSource = "query"
listener.Parser = parser listener.Parser = parser
@ -401,7 +400,7 @@ func TestWriteHTTPQueryParams(t *testing.T) {
} }
func TestWriteHTTPFormData(t *testing.T) { func TestWriteHTTPFormData(t *testing.T) {
parser, _ := parsers.NewFormDataParser("query_measurement", nil, []string{"tagKey"}) parser, _ := parsers.NewFormUrlencodedParser("query_measurement", nil, []string{"tagKey"})
listener := newTestHTTPListenerV2() listener := newTestHTTPListenerV2()
listener.Parser = parser listener.Parser = parser