diff --git a/pkg/runtime/local_executor_darwin_test.go b/pkg/runtime/local_executor_darwin_test.go index 7a839c2..02c33d4 100644 --- a/pkg/runtime/local_executor_darwin_test.go +++ b/pkg/runtime/local_executor_darwin_test.go @@ -1,9 +1,10 @@ package runtime import ( - "github.com/stretchr/testify/assert" "os" "testing" + + "github.com/stretchr/testify/assert" ) func TestRuntime_WithInheritFromShell(t *testing.T) { @@ -18,7 +19,8 @@ func TestRuntime_WithInheritFromShell(t *testing.T) { } e := LocalExecutor{} - got := e.Execute(test) + got, err := e.Execute(test) + assert.NoError(t, err) assert.Equal(t, "test", got.TestCase.Result.Stdout) } @@ -40,7 +42,8 @@ func TestRuntime_WithInheritFromShell_Overwrite(t *testing.T) { } e := LocalExecutor{} - got := e.Execute(test) + got, err := e.Execute(test) + assert.NoError(t, err) assert.Equal(t, "overwrite from-parent", got.TestCase.Result.Stdout) } diff --git a/pkg/runtime/local_executor_test.go b/pkg/runtime/local_executor_test.go index 40075ec..ccd6a76 100644 --- a/pkg/runtime/local_executor_test.go +++ b/pkg/runtime/local_executor_test.go @@ -2,9 +2,10 @@ package runtime import ( "fmt" - "github.com/stretchr/testify/assert" "runtime" "testing" + + "github.com/stretchr/testify/assert" ) func TestRuntime_WithEnvVariables(t *testing.T) { @@ -29,7 +30,8 @@ func TestRuntime_WithEnvVariables(t *testing.T) { } e := LocalExecutor{} - got := e.Execute(s) + got, err := e.Execute(s) + assert.NoError(t, err) assert.True(t, got.ValidationResult.Success) } @@ -42,7 +44,8 @@ func Test_runTestShouldReturnError(t *testing.T) { } e := LocalExecutor{} - got := e.Execute(test) + got, err := e.Execute(test) + assert.NoError(t, err) if runtime.GOOS == "windows" { assert.Contains(t, got.TestCase.Result.Error.Error(), "chdir /home/invalid") @@ -60,7 +63,8 @@ func TestRuntime_WithInvalidDuration(t *testing.T) { } e := LocalExecutor{} - got := e.Execute(test) + got, err := e.Execute(test) + assert.NoError(t, err) assert.Equal(t, `time: unknown unit "lightyears" in duration "600lightyears"`, got.TestCase.Result.Error.Error()) }