From 860c41441b3bcf542b5701ae2257812879ce47b4 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Tue, 19 Oct 2021 19:01:12 +0300 Subject: Set DTAIL_RUN_INTEGRATIONT_TEST to yes for integration tests --- integrationtests/dcat_test.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'integrationtests/dcat_test.go') diff --git a/integrationtests/dcat_test.go b/integrationtests/dcat_test.go index afcb94c..2516867 100644 --- a/integrationtests/dcat_test.go +++ b/integrationtests/dcat_test.go @@ -4,9 +4,15 @@ import ( "context" "os" "testing" + + "github.com/mimecast/dtail/internal/config" ) func TestDCat(t *testing.T) { + if !config.Env("DTAIL_RUN_INTEGRATION_TESTS") { + t.Log("Skipping") + return + } testdataFile := "dcat.txt" stdoutFile := "dcat.out" @@ -27,6 +33,9 @@ func TestDCat(t *testing.T) { } func TestDCat2(t *testing.T) { + if !config.Env("DTAIL_RUN_INTEGRATION_TESTS") { + return + } testdataFile := "dcat2.txt" expectedFile := "dcat2.txt.expected" stdoutFile := "dcat2.out" @@ -55,6 +64,9 @@ func TestDCat2(t *testing.T) { // TODO: The test currently fails as there is a hostname in the output. What needs // to be done is to ignore the hostnames in the output (which is field 2 of the output) func TestDCatColors(t *testing.T) { + if !config.Env("DTAIL_RUN_INTEGRATION_TESTS") { + return + } testdataFile := "dcatcolors.txt" stdoutFile := "dcatcolors.out" expectedFile := "dcatcolors.expected" -- cgit v1.2.3