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/dtail_test.go | |
| parent | 6edea198188172c603e10201aa2302a28b7b722f (diff) | |
| parent | 6cfc4e161f94ab159d4b1ea491ffe6f166fa6204 (diff) | |
Merge pull request #24 from snonux/develop
Bugfixes around integration tests
Diffstat (limited to 'integrationtests/dtail_test.go')
| -rw-r--r-- | integrationtests/dtail_test.go | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/integrationtests/dtail_test.go b/integrationtests/dtail_test.go index c6d0107..e9cf257 100644 --- a/integrationtests/dtail_test.go +++ b/integrationtests/dtail_test.go @@ -17,7 +17,9 @@ func TestDTailWithServer(t *testing.T) { return } followFile := "dtail.follow.tmp" - greetings := []string{"world!", "sol-system!", "milky-way!", "universe!", "multiverse!"} + port := getUniquePortNumber() + bindAddress := "localhost" + greetings := []string{"World!", "Sol-System!", "Milky-Way!", "Universe!", "Multiverse!"} ctx, cancel := context.WithCancel(context.Background()) defer cancel() @@ -34,10 +36,11 @@ func TestDTailWithServer(t *testing.T) { serverCh, _, _, err := startCommand(ctx, t, "../dserver", + "--cfg", "none", "--logger", "stdout", - "--logLevel", "trace", - "--bindAddress", "localhost", - "--port", "4243", + "--logLevel", "info", + "--bindAddress", bindAddress, + "--port", fmt.Sprintf("%d", port), "--relaxedAuth", ) if err != nil { @@ -45,13 +48,13 @@ func TestDTailWithServer(t *testing.T) { return } - // TODO: In testmode, the client should not try to manipulate any known_hosts files. - // TODO: In testmode, never read a config file (use none for all commands) + // MAYBETODO: In testmode, never read a config file (use none for all commands) clientCh, _, _, err := startCommand(ctx, t, "../dtail", + "--cfg", "none", "--logger", "stdout", - "--logLevel", "trace", - "--servers", "localhost:4243", + "--logLevel", "info", + "--servers", fmt.Sprintf("%s:%d", bindAddress, port), "--files", followFile, "--grep", "Hello", "--trustAllHosts", |
