diff options
| author | Paul Buetow <paul@buetow.org> | 2021-10-24 14:06:11 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2021-10-24 14:06:11 +0300 |
| commit | 6cfc4e161f94ab159d4b1ea491ffe6f166fa6204 (patch) | |
| tree | 093fb4bff0bdf086188df86ca5d13dc7f8a34e4f /integrationtests/dtail_test.go | |
| parent | 87b6c47999f49c2deff42fdcc703c419b251bdbc (diff) | |
Integration tests can run concurrently, so we now have unique TCP ports for each
Diffstat (limited to 'integrationtests/dtail_test.go')
| -rw-r--r-- | integrationtests/dtail_test.go | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/integrationtests/dtail_test.go b/integrationtests/dtail_test.go index 6814c42..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() @@ -37,8 +39,8 @@ func TestDTailWithServer(t *testing.T) { "--cfg", "none", "--logger", "stdout", "--logLevel", "info", - "--bindAddress", "localhost", - "--port", "4243", + "--bindAddress", bindAddress, + "--port", fmt.Sprintf("%d", port), "--relaxedAuth", ) if err != nil { @@ -52,7 +54,7 @@ func TestDTailWithServer(t *testing.T) { "--cfg", "none", "--logger", "stdout", "--logLevel", "info", - "--servers", "localhost:4243", + "--servers", fmt.Sprintf("%s:%d", bindAddress, port), "--files", followFile, "--grep", "Hello", "--trustAllHosts", |
