diff --git a/.gitignore b/.gitignore index 098215f4..f9fd1a26 100644 --- a/.gitignore +++ b/.gitignore @@ -16,4 +16,13 @@ # vendor/ ## Custom -.DS_Store \ No newline at end of file +.DS_Store + +## Test-related (should be fixed) +dump.bin +dump.txt +dump1.txt +dumpfiltererd.txt +mdt_msg_samples/hexdump.bin +models.txt +pipeline.log \ No newline at end of file diff --git a/Makefile b/Makefile index a2ddc816..7cf49e3e 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ BINARY=pipeline include skeleton/pipeline.mk # Setup pretest as a prerequisite of tests. -test: pretest -pretest: - @echo Setting up zookeeper, kafka. Docker required. +testall: pretestinfra +pretestinfra: + @echo Setting up Zookeeper and Kafka. Docker required. tools/test/run.sh diff --git a/skeleton/pipeline.mk b/skeleton/pipeline.mk index a9c9597f..6c9ab228 100644 --- a/skeleton/pipeline.mk +++ b/skeleton/pipeline.mk @@ -38,6 +38,10 @@ bin/$(BINARY): $(SOURCES) generated_source: go generate -x +.PHONY: testall +testall: + go test -v -tags=integration -run=. -bench=. $(PROFILE) + .PHONY: test test: go test -v -run=. -bench=. $(PROFILE) diff --git a/xport_kafka_test.go b/xport_kafka_test.go index 25e7503e..217491b1 100644 --- a/xport_kafka_test.go +++ b/xport_kafka_test.go @@ -5,16 +5,18 @@ // All rights reserved. // // +// +build integration package main import ( "encoding/json" "fmt" - "github.com/dlintw/goconf" "strings" "testing" "time" + + "github.com/dlintw/goconf" ) var kmod kafkaOutputModule