Fix building tests that used `DefaultConfig()` but didn't pickup the package move.
This commit is contained in:
parent
b199743b8a
commit
837b387dcb
|
@ -10,6 +10,7 @@ import (
|
|||
"github.com/hashicorp/nomad/nomad/structs"
|
||||
"github.com/hashicorp/nomad/testutil"
|
||||
|
||||
"github.com/hashicorp/nomad/client/config"
|
||||
ctestutil "github.com/hashicorp/nomad/client/testutil"
|
||||
)
|
||||
|
||||
|
@ -25,7 +26,7 @@ func (m *MockAllocStateUpdater) Update(alloc *structs.Allocation) {
|
|||
|
||||
func testAllocRunner(restarts bool) (*MockAllocStateUpdater, *AllocRunner) {
|
||||
logger := testLogger()
|
||||
conf := DefaultConfig()
|
||||
conf := config.DefaultConfig()
|
||||
conf.StateDir = os.TempDir()
|
||||
conf.AllocDir = os.TempDir()
|
||||
upd := &MockAllocStateUpdater{}
|
||||
|
|
|
@ -70,7 +70,7 @@ func testServer(t *testing.T, cb func(*nomad.Config)) (*nomad.Server, string) {
|
|||
}
|
||||
|
||||
func testClient(t *testing.T, cb func(c *config.Config)) *Client {
|
||||
conf := DefaultConfig()
|
||||
conf := nomad.DefaultConfig()
|
||||
conf.DevMode = true
|
||||
conf.ConsulConfig = &sconfig.ConsulConfig{}
|
||||
if cb != nil {
|
||||
|
|
|
@ -11,6 +11,7 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/hashicorp/nomad/client/allocdir"
|
||||
"github.com/hashicorp/nomad/client/config"
|
||||
"github.com/hashicorp/nomad/client/driver"
|
||||
cstructs "github.com/hashicorp/nomad/client/driver/structs"
|
||||
"github.com/hashicorp/nomad/nomad/mock"
|
||||
|
@ -46,7 +47,7 @@ func testTaskRunner(restarts bool) (*MockTaskStateUpdater, *TaskRunner) {
|
|||
// the passed allocation.
|
||||
func testTaskRunnerFromAlloc(restarts bool, alloc *structs.Allocation) (*MockTaskStateUpdater, *TaskRunner) {
|
||||
logger := testLogger()
|
||||
conf := DefaultConfig()
|
||||
conf := config.DefaultConfig()
|
||||
conf.StateDir = os.TempDir()
|
||||
conf.AllocDir = os.TempDir()
|
||||
upd := &MockTaskStateUpdater{}
|
||||
|
|
Loading…
Reference in New Issue