diff options
| author | Paul Buetow <35781042+pbuetow@users.noreply.github.com> | 2021-10-24 18:05:47 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-24 18:05:47 +0300 |
| commit | 3d24204754aff155de21b01e9e3d82eb460fb87f (patch) | |
| tree | 093fb4bff0bdf086188df86ca5d13dc7f8a34e4f /integrationtests/dcat_test.go | |
| parent | 6edea198188172c603e10201aa2302a28b7b722f (diff) | |
| parent | 6cfc4e161f94ab159d4b1ea491ffe6f166fa6204 (diff) | |
Merge pull request #24 from snonux/develop
Bugfixes around integration tests
Diffstat (limited to 'integrationtests/dcat_test.go')
| -rw-r--r-- | integrationtests/dcat_test.go | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/integrationtests/dcat_test.go b/integrationtests/dcat_test.go index 2516867..777e835 100644 --- a/integrationtests/dcat_test.go +++ b/integrationtests/dcat_test.go @@ -17,7 +17,7 @@ func TestDCat(t *testing.T) { stdoutFile := "dcat.out" _, err := runCommand(context.TODO(), t, stdoutFile, - "../dcat", "--spartan", testdataFile) + "../dcat", "--spartan", "--cfg", "none", testdataFile) if err != nil { t.Error(err) @@ -40,14 +40,15 @@ func TestDCat2(t *testing.T) { expectedFile := "dcat2.txt.expected" stdoutFile := "dcat2.out" - args := []string{"--spartan", "--logLevel", "error"} + args := []string{"--spartan", "--logLevel", "error", "--cfg", "none"} // Cat file 100 times in one session. for i := 0; i < 100; i++ { args = append(args, testdataFile) } - if _, err := runCommand(context.TODO(), t, stdoutFile, "../dcat", args...); err != nil { + _, err := runCommand(context.TODO(), t, stdoutFile, "../dcat", args...) + if err != nil { t.Error(err) return } @@ -60,19 +61,17 @@ func TestDCat2(t *testing.T) { os.Remove(stdoutFile) } -/* -// 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" _, err := runCommand(context.TODO(), t, stdoutFile, - "../dcat", "--logLevel", "error", testdataFile) + "../dcat", "--logLevel", "error", "--cfg", "none", testdataFile) if err != nil { t.Error(err) @@ -86,4 +85,3 @@ func TestDCatColors(t *testing.T) { os.Remove(stdoutFile) } -*/ |
