(t *testing.T)
| 209 | } |
| 210 | |
| 211 | func TestInsertMissingSerial(t *testing.T) { |
| 212 | dbAccessor, err := prepDB() |
| 213 | if err != nil { |
| 214 | t.Fatal(err) |
| 215 | } |
| 216 | |
| 217 | _, cert, pemBytes, signer, err := makeCertificate() |
| 218 | |
| 219 | if err != nil { |
| 220 | t.Fatal(err) |
| 221 | } |
| 222 | |
| 223 | resp, body := makeRequest(t, dbAccessor, signer, map[string]interface{}{ |
| 224 | "authority_key_identifier": hex.EncodeToString(cert.AuthorityKeyId), |
| 225 | "status": "good", |
| 226 | "pem": string(pemBytes), |
| 227 | "expiry": cert.NotAfter.UTC().Format(time.RFC3339), |
| 228 | }) |
| 229 | |
| 230 | if resp.StatusCode != http.StatusBadRequest { |
| 231 | t.Fatal("Expected HTTP Bad Request", resp.StatusCode, string(body)) |
| 232 | } |
| 233 | } |
| 234 | |
| 235 | func TestInsertMissingAKI(t *testing.T) { |
| 236 | dbAccessor, err := prepDB() |
nothing calls this directly
no test coverage detected
searching dependent graphs…