Skip to content

Commit

Permalink
Remove useless unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
joshdover committed Jan 24, 2023
1 parent 35931c4 commit d09de60
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions metricbeat/module/elasticsearch/ingest_pipeline/data_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ package ingest_pipeline

import (
"io/ioutil"
"net/http"
"net/http/httptest"
"testing"

"github.com/stretchr/testify/require"
Expand All @@ -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{}

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit d09de60

Please sign in to comment.