1
0
Fork 0
mirror of https://code.forgejo.org/forgejo/runner.git synced 2025-09-30 19:22:09 +00:00

Add an extra test

This commit is contained in:
Dan Sosedoff 2019-03-01 21:36:07 -06:00
parent fa888ff84c
commit c2456db060
3 changed files with 12 additions and 1 deletions

View file

@ -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)
}
}
}

View file

@ -0,0 +1,2 @@
FROM alpine:3.8
COPY foobar /foo/bar

8
actions/testdata/buildfail.workflow vendored Normal file
View file

@ -0,0 +1,8 @@
workflow "test" {
on = "push"
resolves = ["test-action"]
}
action "test-action" {
uses = "./buildfail-action"
}