From 9e344ae404ced73f1fa4fb1ccc261c8e543745e7 Mon Sep 17 00:00:00 2001 From: Victor Castell Date: Mon, 24 Jun 2019 23:39:22 +0200 Subject: [PATCH] Fix test --- dkron/job_test.go | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/dkron/job_test.go b/dkron/job_test.go index 941d78a15..1a1501e5c 100644 --- a/dkron/job_test.go +++ b/dkron/job_test.go @@ -1,17 +1,24 @@ package dkron import ( + "io/ioutil" + "os" "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) func TestJobGetParent(t *testing.T) { + dir, err := ioutil.TempDir("", "dkron-test") + require.NoError(t, err) + defer os.RemoveAll(dir) + + s, err := NewStore(nil, dir) + defer s.Shutdown() + require.NoError(t, err) + a := &Agent{} - s, err := NewStore(a, "test") - if err != nil { - t.Fatal(err) - } a.Store = s parentTestJob := &Job{