(t *testing.T)
| 53 | } |
| 54 | |
| 55 | func TestLoadWorkflowJSON(t *testing.T) { |
| 56 | dir := t.TempDir() |
| 57 | path := filepath.Join(dir, "wf.json") |
| 58 | os.WriteFile(path, []byte(`{"steps":[{"pattern":"a"},{"pattern":"b"}]}`), 0o644) |
| 59 | |
| 60 | wf, err := LoadWorkflow(path) |
| 61 | if err != nil { |
| 62 | t.Fatalf("unexpected error: %v", err) |
| 63 | } |
| 64 | if len(wf.Steps) != 2 || wf.Steps[1].Pattern != "b" { |
| 65 | t.Fatalf("unexpected steps: %+v", wf.Steps) |
| 66 | } |
| 67 | } |
| 68 | |
| 69 | func TestLoadWorkflowBadPath(t *testing.T) { |
| 70 | tests := []struct { |
nothing calls this directly
no test coverage detected