mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-08-11 17:50:58 +00:00
chore(tests): workflows are validated via a schema
This test was introduced by 61b7859f12
to verify a safeguard prevents a crash. With schema validation it is
caught at an earlier stage.
This commit is contained in:
parent
4453e1a834
commit
5faf1bbc54
1 changed files with 2 additions and 3 deletions
|
@ -226,9 +226,8 @@ jobs:
|
|||
foo: {{ a }}
|
||||
`
|
||||
|
||||
workflow, err := ReadWorkflow(strings.NewReader(yaml))
|
||||
assert.NoError(t, err, "read workflow should succeed")
|
||||
assert.Nil(t, workflow.GetJob("test").Steps[0].GetEnv())
|
||||
_, err := ReadWorkflow(strings.NewReader(yaml))
|
||||
assert.ErrorContains(t, err, "Line: 11 Column 16: Expected a scalar got mapping")
|
||||
}
|
||||
|
||||
func TestReadWorkflow_RunsOnLabels(t *testing.T) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue