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/dtailhealth_test.go | |
| parent | 6edea198188172c603e10201aa2302a28b7b722f (diff) | |
| parent | 6cfc4e161f94ab159d4b1ea491ffe6f166fa6204 (diff) | |
Merge pull request #24 from snonux/develop
Bugfixes around integration tests
Diffstat (limited to 'integrationtests/dtailhealth_test.go')
| -rw-r--r-- | integrationtests/dtailhealth_test.go | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/integrationtests/dtailhealth_test.go b/integrationtests/dtailhealth_test.go index 8c0918f..271f11d 100644 --- a/integrationtests/dtailhealth_test.go +++ b/integrationtests/dtailhealth_test.go @@ -62,17 +62,20 @@ func TestDTailHealthCheck3(t *testing.T) { return } stdoutFile := "dtailhealth3.stdout.tmp" - expectedStdoutFile := "dtailhealth3.expected" + port := getUniquePortNumber() + bindAddress := "localhost" + expectedOut := fmt.Sprintf("OK: All fine at %s:%d :-)", bindAddress, port) ctx, cancel := context.WithCancel(context.Background()) defer cancel() _, _, _, err := startCommand(ctx, t, "../dserver", + "--cfg", "none", "--logger", "stdout", "--logLevel", "trace", - "--bindAddress", "localhost", - "--port", "4242", + "--bindAddress", bindAddress, + "--port", fmt.Sprintf("%d", port), ) if err != nil { t.Error(err) @@ -80,13 +83,13 @@ func TestDTailHealthCheck3(t *testing.T) { } _, err = runCommandRetry(ctx, t, 10, stdoutFile, - "../dtailhealth", "--server", "localhost:4242") + "../dtailhealth", "--server", fmt.Sprintf("%s:%d", bindAddress, port)) if err != nil { t.Error(err) return } - if err := compareFiles(t, stdoutFile, expectedStdoutFile); err != nil { + if err := fileContainsStr(t, stdoutFile, expectedOut); err != nil { t.Error(err) return } |
