mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 02:15:43 +03:00
test: update tests to properly use AllocDir
Also use t.TempDir when possible.
This commit is contained in:
@@ -83,10 +83,12 @@ func (h *DriverHarness) Kill() {
|
||||
func (h *DriverHarness) MkAllocDir(t *drivers.TaskConfig, enableLogs bool) func() {
|
||||
dir, err := ioutil.TempDir("", "nomad_driver_harness-")
|
||||
require.NoError(h.t, err)
|
||||
t.AllocDir = dir
|
||||
|
||||
allocDir := allocdir.NewAllocDir(h.logger, dir, t.AllocID)
|
||||
require.NoError(h.t, allocDir.Build())
|
||||
|
||||
t.AllocDir = allocDir.AllocDir
|
||||
|
||||
taskDir := allocDir.NewTaskDir(t.Name)
|
||||
|
||||
caps, err := h.Capabilities()
|
||||
|
||||
Reference in New Issue
Block a user