(t *testing.T)
| 25 | ) |
| 26 | |
| 27 | func TestCITestsRuntimeError(t *testing.T) { |
| 28 | t.Parallel() |
| 29 | |
| 30 | ctrl := gomock.NewController(t) |
| 31 | mockRepoClient := mockrepo.NewMockRepoClient(ctrl) |
| 32 | mockRepoClient.EXPECT().ListCommits().Return(nil, fmt.Errorf("some runtime error")).AnyTimes() |
| 33 | |
| 34 | req := checker.CheckRequest{ |
| 35 | RepoClient: mockRepoClient, |
| 36 | } |
| 37 | res := CITests(&req) |
| 38 | |
| 39 | want := "CI-Tests" |
| 40 | if res.Name != want { |
| 41 | t.Errorf("got: %q, want: %q", res.Name, want) |
| 42 | } |
| 43 | ctrl.Finish() |
| 44 | } |
nothing calls this directly
no test coverage detected