Skip to content

Commit

Permalink
cleanup tests and makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
ruflin committed Feb 4, 2019
1 parent f915027 commit c3341db
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
16 changes: 8 additions & 8 deletions libbeat/kibana/index_pattern_generator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ func TestGenerate(t *testing.T) {
tmpDir := tmpPath(t)
defer os.RemoveAll(tmpDir)

v6, _ := common.NewVersion("7.0.0-alpha1")
versions := []*common.Version{v6}
v7, _ := common.NewVersion("7.0.0-alpha1")
versions := []*common.Version{v7}
var d common.MapStr
for _, version := range versions {
data, err := ioutil.ReadFile("./testdata/fields.yml")
Expand All @@ -93,7 +93,7 @@ func TestGenerate(t *testing.T) {
}
}

tests := []ttt{
tests := []compare{
{
existing: "testdata/beat-6.json",
created: d,
Expand All @@ -103,7 +103,7 @@ func TestGenerate(t *testing.T) {
testGenerate(t, tests, true)
}

type ttt struct {
type compare struct {
existing string
created common.MapStr
}
Expand All @@ -112,8 +112,8 @@ func TestGenerateExtensive(t *testing.T) {
tmpDir := tmpPath(t)
defer os.RemoveAll(tmpDir)

version6, _ := common.NewVersion("7.0.0-alpha1")
versions := []*common.Version{version6}
version7, _ := common.NewVersion("7.0.0-alpha1")
versions := []*common.Version{version7}

var d common.MapStr
for _, version := range versions {
Expand All @@ -132,7 +132,7 @@ func TestGenerateExtensive(t *testing.T) {
}
}

tests := []ttt{
tests := []compare{
{
existing: "testdata/extensive/metricbeat-6.json",
created: d,
Expand All @@ -141,7 +141,7 @@ func TestGenerateExtensive(t *testing.T) {
testGenerate(t, tests, false)
}

func testGenerate(t *testing.T, tests []ttt, sourceFilters bool) {
func testGenerate(t *testing.T, tests []compare, sourceFilters bool) {
for _, test := range tests {
// compare default
existing, err := readJson(test.existing)
Expand Down
1 change: 0 additions & 1 deletion metricbeat/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,4 @@ test-module: python-env update metricbeat.test
assets:
go run ${ES_BEATS}/metricbeat/scripts/assets/assets.go ${ES_BEATS}/metricbeat/module
mkdir -p include/fields
#go run ${ES_BEATS}/dev-tools/cmd/asset/asset.go -license ${LICENSE} -pkg include -in ${ES_BEATS}/metricbeat/_meta/fields.common.yml -out include/fields.go $(BEAT_NAME)
go run ${ES_BEATS}/libbeat/scripts/cmd/global_fields/main.go -es_beats_path ${ES_BEATS} -beat_path ${PWD} | go run ${ES_BEATS}/dev-tools/cmd/asset/asset.go -license ${LICENSE} -out ./include/fields/fields.go -pkg include -priority asset.LibbeatFieldsPri ${ES_BEATS}/libbeat/fields.yml $(BEAT_NAME)

0 comments on commit c3341db

Please sign in to comment.