mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 10:25:42 +03:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user