diff options
Diffstat (limited to 'actions')
-rw-r--r-- | actions/runner_test.go | 3 | ||||
-rw-r--r-- | actions/testdata/buildfail-action/Dockerfile | 2 | ||||
-rw-r--r-- | actions/testdata/buildfail.workflow | 8 |
3 files changed, 12 insertions, 1 deletions
diff --git a/actions/runner_test.go b/actions/runner_test.go index 92ef52c..46c969f 100644 --- a/actions/runner_test.go +++ b/actions/runner_test.go @@ -21,6 +21,7 @@ func TestRunEvent(t *testing.T) { {"basic.workflow", "push", ""}, {"pipe.workflow", "push", ""}, {"fail.workflow", "push", "exit with `FAILURE`: 1"}, + {"buildfail.workflow", "push", "COPY failed"}, {"regex.workflow", "push", "exit with `NEUTRAL`: 78"}, {"gitref.workflow", "push", ""}, {"env.workflow", "push", ""}, @@ -42,7 +43,7 @@ func TestRunEvent(t *testing.T) { if table.errorMessage == "" { assert.NilError(t, err, table.workflowPath) } else { - assert.Error(t, err, table.errorMessage) + assert.ErrorContains(t, err, table.errorMessage) } } } diff --git a/actions/testdata/buildfail-action/Dockerfile b/actions/testdata/buildfail-action/Dockerfile new file mode 100644 index 0000000..3a4b7b1 --- /dev/null +++ b/actions/testdata/buildfail-action/Dockerfile @@ -0,0 +1,2 @@ +FROM alpine:3.8 +COPY foobar /foo/bar
\ No newline at end of file diff --git a/actions/testdata/buildfail.workflow b/actions/testdata/buildfail.workflow new file mode 100644 index 0000000..51eae00 --- /dev/null +++ b/actions/testdata/buildfail.workflow @@ -0,0 +1,8 @@ +workflow "test" { + on = "push" + resolves = ["test-action"] +} + +action "test-action" { + uses = "./buildfail-action" +}
\ No newline at end of file |