Add an extra test
This commit is contained in:
parent
5330599c93
commit
1c25ee9d71
3 changed files with 12 additions and 1 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
2
actions/testdata/buildfail-action/Dockerfile
vendored
Normal file
2
actions/testdata/buildfail-action/Dockerfile
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
FROM alpine:3.8
|
||||
COPY foobar /foo/bar
|
8
actions/testdata/buildfail.workflow
vendored
Normal file
8
actions/testdata/buildfail.workflow
vendored
Normal file
|
@ -0,0 +1,8 @@
|
|||
workflow "test" {
|
||||
on = "push"
|
||||
resolves = ["test-action"]
|
||||
}
|
||||
|
||||
action "test-action" {
|
||||
uses = "./buildfail-action"
|
||||
}
|
Loading…
Reference in a new issue