test: Remove use of "mitchellh/go-testing-interface" for stdlib. (#25640)

The stdlib testing package now includes this interface, so we can
remove our dependency on the external library.
This commit is contained in:
James Rasell
2025-04-14 07:43:49 +01:00
committed by GitHub
parent d293684d3d
commit 85c30dfd1e
16 changed files with 44 additions and 47 deletions

View File

@@ -22,13 +22,13 @@ import (
"net/http"
"os"
"os/exec"
"testing"
"time"
cleanhttp "github.com/hashicorp/go-cleanhttp"
"github.com/hashicorp/nomad/ci"
"github.com/hashicorp/nomad/helper/discover"
"github.com/hashicorp/nomad/helper/pointer"
testing "github.com/mitchellh/go-testing-interface"
)
// TestServerConfig is the main server configuration struct.
@@ -154,7 +154,7 @@ func defaultServerConfig() *TestServerConfig {
type TestServer struct {
cmd *exec.Cmd
Config *TestServerConfig
t testing.T
t testing.TB
HTTPAddr string
SerfAddr string
@@ -163,7 +163,7 @@ type TestServer struct {
// NewTestServer creates a new TestServer, and makes a call to
// an optional callback function to modify the configuration.
func NewTestServer(t testing.T, cb ServerConfigCallback) *TestServer {
func NewTestServer(t testing.TB, cb ServerConfigCallback) *TestServer {
path, err := discover.NomadExecutable()
if err != nil {
t.Skipf("nomad not found, skipping: %v", err)