(t *testing.T)
| 148 | } |
| 149 | |
| 150 | func TestGetByDigest_Error(t *testing.T) { |
| 151 | fetcher := mockDataGenerator{ |
| 152 | NumUserAttestations: 5, |
| 153 | } |
| 154 | |
| 155 | c := LiveClient{ |
| 156 | githubAPI: mockAPIClient{ |
| 157 | OnRESTWithNext: fetcher.OnRESTWithNextError, |
| 158 | }, |
| 159 | logger: io.NewTestHandler(), |
| 160 | } |
| 161 | |
| 162 | attestations, err := c.GetByDigest(testFetchParamsWithRepo) |
| 163 | require.Error(t, err) |
| 164 | require.Nil(t, attestations) |
| 165 | } |
| 166 | |
| 167 | func TestFetchBundleFromAttestations_BundleURL(t *testing.T) { |
| 168 | httpClient := &mockHttpClient{} |
nothing calls this directly
no test coverage detected