From 4a06106054a49707a7ae2d2aee4fdbb92fd04954 Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Wed, 18 Dec 2024 07:12:54 +1100 Subject: [PATCH] Update tests --- task_test.go | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/task_test.go b/task_test.go index afb40fa19d..b0d6da7810 100644 --- a/task_test.go +++ b/task_test.go @@ -220,10 +220,11 @@ func TestSpecialVars(t *testing.T) { t.Run(test.target, func(t *testing.T) { var buff bytes.Buffer e := &task.Executor{ - Dir: dir, - Stdout: &buff, - Stderr: &buff, - Silent: true, + Dir: dir, + Stdout: &buff, + Stderr: &buff, + Silent: true, + EnableVersionCheck: true, } require.NoError(t, e.Setup()) require.NoError(t, e.Run(context.Background(), &ast.Call{Task: test.target})) @@ -945,9 +946,10 @@ func TestTaskVersion(t *testing.T) { for _, test := range tests { t.Run(test.Dir, func(t *testing.T) { e := task.Executor{ - Dir: test.Dir, - Stdout: io.Discard, - Stderr: io.Discard, + Dir: test.Dir, + Stdout: io.Discard, + Stderr: io.Discard, + EnableVersionCheck: true, } err := e.Setup() if test.wantErr { @@ -1767,9 +1769,10 @@ func TestDynamicVariablesShouldRunOnTheTaskDir(t *testing.T) { func TestDisplaysErrorOnVersion1Schema(t *testing.T) { e := task.Executor{ - Dir: "testdata/version/v1", - Stdout: io.Discard, - Stderr: io.Discard, + Dir: "testdata/version/v1", + Stdout: io.Discard, + Stderr: io.Discard, + EnableVersionCheck: true, } err := e.Setup() require.Error(t, err) @@ -1779,9 +1782,10 @@ func TestDisplaysErrorOnVersion1Schema(t *testing.T) { func TestDisplaysErrorOnVersion2Schema(t *testing.T) { var buff bytes.Buffer e := task.Executor{ - Dir: "testdata/version/v2", - Stdout: io.Discard, - Stderr: &buff, + Dir: "testdata/version/v2", + Stdout: io.Discard, + Stderr: &buff, + EnableVersionCheck: true, } err := e.Setup() require.Error(t, err)