(t *testing.T)
| 257 | } |
| 258 | |
| 259 | func TestInsertMissingExpiry(t *testing.T) { |
| 260 | dbAccessor, err := prepDB() |
| 261 | if err != nil { |
| 262 | t.Fatal(err) |
| 263 | } |
| 264 | |
| 265 | serialNumber, cert, pemBytes, signer, err := makeCertificate() |
| 266 | |
| 267 | if err != nil { |
| 268 | t.Fatal(err) |
| 269 | } |
| 270 | |
| 271 | resp, body := makeRequest(t, dbAccessor, signer, map[string]interface{}{ |
| 272 | "serial_number": serialNumber.Text(10), |
| 273 | "authority_key_identifier": hex.EncodeToString(cert.AuthorityKeyId), |
| 274 | "status": "good", |
| 275 | "pem": string(pemBytes), |
| 276 | }) |
| 277 | |
| 278 | if resp.StatusCode != http.StatusBadRequest { |
| 279 | t.Fatal("Expected HTTP Bad Request", resp.StatusCode, string(body)) |
| 280 | } |
| 281 | } |
| 282 | |
| 283 | func TestInsertMissingPEM(t *testing.T) { |
| 284 | dbAccessor, err := prepDB() |
nothing calls this directly
no test coverage detected
searching dependent graphs…