()
| 36 | } |
| 37 | |
| 38 | func sampleConvention() Artifact { |
| 39 | return Artifact{ |
| 40 | Kind: KindConvention, |
| 41 | FormatVersion: FormatVersion, |
| 42 | Title: "Run the test suite before pushing", |
| 43 | Fields: map[string]any{ |
| 44 | "status": "active", |
| 45 | "trigger": "on-commit", |
| 46 | "scope": "repo", |
| 47 | "priority": "high", |
| 48 | "role": "engineer", |
| 49 | }, |
| 50 | Body: "Always run `make test` before pushing to main.\n", |
| 51 | Provenance: Provenance{ |
| 52 | Workspace: "demo", |
| 53 | ExportedAt: "2026-06-22T00:00:00Z", |
| 54 | Author: "xarmian", |
| 55 | FormatVersion: FormatVersion, |
| 56 | }, |
| 57 | } |
| 58 | } |
| 59 | |
| 60 | func TestEncodeGolden(t *testing.T) { |
| 61 | cases := []struct { |
no outgoing calls
no test coverage detected