Check the error channel for an error and if one is present, calls t.Fatal(e.Error()). Note that this supports tests that send nil to the error channel and so report error only if e is != nil.
(t *testing.T, errCh chan error)
| 83 | // send nil to the error channel and so report error only if |
| 84 | // e is != nil. |
| 85 | func checkErrChannel(t *testing.T, errCh chan error) { |
| 86 | t.Helper() |
| 87 | select { |
| 88 | case e := <-errCh: |
| 89 | if e != nil { |
| 90 | t.Fatal(e.Error()) |
| 91 | } |
| 92 | default: |
| 93 | } |
| 94 | } |
| 95 | |
| 96 | func TestVersionMatchesTag(t *testing.T) { |
| 97 | refType := os.Getenv("GITHUB_REF_TYPE") |
no test coverage detected