From d09de60ef14576c611700ddd16435e7c93d12285 Mon Sep 17 00:00:00 2001 From: Josh Dover <1813008+joshdover@users.noreply.github.com> Date: Fri, 20 Jan 2023 12:27:25 +0100 Subject: [PATCH] Remove useless unit test --- .../ingest_pipeline/data_test.go | 27 ------------------- 1 file changed, 27 deletions(-) diff --git a/metricbeat/module/elasticsearch/ingest_pipeline/data_test.go b/metricbeat/module/elasticsearch/ingest_pipeline/data_test.go index c7758914b53..5ae9ad6def5 100644 --- a/metricbeat/module/elasticsearch/ingest_pipeline/data_test.go +++ b/metricbeat/module/elasticsearch/ingest_pipeline/data_test.go @@ -19,8 +19,6 @@ package ingest_pipeline import ( "io/ioutil" - "net/http" - "net/http/httptest" "testing" "github.com/stretchr/testify/require" @@ -30,23 +28,6 @@ import ( "github.com/elastic/beats/v7/metricbeat/module/elasticsearch" ) -func createEsMuxer() *http.ServeMux { - mux := http.NewServeMux() - // mux.Handle("") - - return mux -} - -func TestData(t *testing.T) { - mux := createEsMuxer() - server := httptest.NewServer(mux) - defer server.Close() - - ms := mbtest.NewReportingMetricSetV2Error(t, getConfig(server.URL)) - err := mbtest.WriteEventsReporterV2Error(ms, t, "") - require.NoError(t, err) -} - func TestMapper(t *testing.T) { reporter := &mbtest.CapturingReporterV2{} @@ -136,14 +117,6 @@ func TestSampling(t *testing.T) { require.Equal(t, 0, len(processorEvents)) } -func getConfig(host string) map[string]interface{} { - return map[string]interface{}{ - "module": elasticsearch.ModuleName, - "metricsets": []string{"ingest"}, - "hosts": []string{host}, - } -} - func requireMetricSetFields(t *testing.T, event mb.Event, fieldName string, expected interface{}) { val, err := event.MetricSetFields.GetValue(fieldName) require.NoError(t, err)