From 4baea90807d8258f510cda7419afc8b31c18c354 Mon Sep 17 00:00:00 2001 From: Charlie Voiselle <464492+angrycub@users.noreply.github.com> Date: Fri, 7 Apr 2023 15:51:33 -0400 Subject: [PATCH] Refactor testserver to use ci.PortAllocator --- api/internal/testutil/server.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/api/internal/testutil/server.go b/api/internal/testutil/server.go index 1297c8a9fb3..8512a715428 100644 --- a/api/internal/testutil/server.go +++ b/api/internal/testutil/server.go @@ -23,9 +23,9 @@ import ( "github.com/hashicorp/go-cleanhttp" "github.com/hashicorp/nomad/api/internal/testutil/discover" + "github.com/hashicorp/nomad/ci" testing "github.com/mitchellh/go-testing-interface" "github.com/shoenig/test/must" - "github.com/shoenig/test/portal" "github.com/shoenig/test/wait" ) @@ -104,8 +104,7 @@ type ServerConfigCallback func(c *TestServerConfig) // defaultServerConfig returns a new TestServerConfig struct pre-populated with // usable config for running as server. func defaultServerConfig(t testing.T) *TestServerConfig { - grabber := portal.New(t) - ports := grabber.Grab(3) + ports := ci.PortAllocator.Grab(3) logLevel := "ERROR" if envLogLevel := os.Getenv("NOMAD_TEST_LOG_LEVEL"); envLogLevel != "" {