@@ -386,13 +386,13 @@ func addExpiringCerts(t *testing.T, ctx *testCtx) []core.Certificate {
386386 test .AssertNotError (t , err , "Couldn't add certC" )
387387 err = setupDBMap .Insert (certD )
388388 test .AssertNotError (t , err , "Couldn't add certD" )
389- _ , err = setupDBMap .Exec ("INSERT INTO certificateStatus (serial, lastExpirationNagSent, status, notAfter, ocspLastUpdated, revokedDate, revokedReason, LockCol, subscriberApproved ) VALUES (?,?,?,?,?,?,?,?,? )" , serial1String , ctx .fc .Now ().AddDate (0 , 0 , - 3 ), string (core .OCSPStatusGood ), rawCertA .NotAfter , time.Time {}, time.Time {}, 0 , 0 , false )
389+ _ , err = setupDBMap .Exec ("INSERT INTO certificateStatus (serial, lastExpirationNagSent, status, notAfter, ocspLastUpdated, revokedDate, revokedReason) VALUES (?,?,?,?,?,?,?)" , serial1String , ctx .fc .Now ().AddDate (0 , 0 , - 3 ), string (core .OCSPStatusGood ), rawCertA .NotAfter , time.Time {}, time.Time {}, 0 )
390390 test .AssertNotError (t , err , "Couldn't add certStatusA" )
391- _ , err = setupDBMap .Exec ("INSERT INTO certificateStatus (serial, lastExpirationNagSent, status, notAfter, ocspLastUpdated, revokedDate, revokedReason, LockCol, subscriberApproved ) VALUES (?,?,?,?,?,?,?,?,? )" , serial2String , ctx .fc .Now ().Add (- 36 * time .Hour ), string (core .OCSPStatusGood ), rawCertB .NotAfter , time.Time {}, time.Time {}, 0 , 0 , false )
391+ _ , err = setupDBMap .Exec ("INSERT INTO certificateStatus (serial, lastExpirationNagSent, status, notAfter, ocspLastUpdated, revokedDate, revokedReason) VALUES (?,?,?,?,?,?,?)" , serial2String , ctx .fc .Now ().Add (- 36 * time .Hour ), string (core .OCSPStatusGood ), rawCertB .NotAfter , time.Time {}, time.Time {}, 0 )
392392 test .AssertNotError (t , err , "Couldn't add certStatusB" )
393- _ , err = setupDBMap .Exec ("INSERT INTO certificateStatus (serial, status, notAfter, lastExpirationNagSent, ocspLastUpdated, revokedDate, revokedReason, LockCol, subscriberApproved ) VALUES (?,?,?,?,?,?,?,?,? )" , serial3String , string (core .OCSPStatusGood ), rawCertC .NotAfter , time.Time {}, time.Time {}, time.Time {}, 0 , 0 , false )
393+ _ , err = setupDBMap .Exec ("INSERT INTO certificateStatus (serial, status, notAfter, lastExpirationNagSent, ocspLastUpdated, revokedDate, revokedReason) VALUES (?,?,?,?,?,?,?)" , serial3String , string (core .OCSPStatusGood ), rawCertC .NotAfter , time.Time {}, time.Time {}, time.Time {}, 0 )
394394 test .AssertNotError (t , err , "Couldn't add certStatusC" )
395- _ , err = setupDBMap .Exec ("INSERT INTO certificateStatus (serial, status, notAfter, lastExpirationNagSent, ocspLastUpdated, revokedDate, revokedReason, LockCol, subscriberApproved ) VALUES (?,?,?,?,?,?,?,?,? )" , serial4String , string (core .OCSPStatusGood ), rawCertD .NotAfter , time.Time {}, time.Time {}, time.Time {}, 0 , 0 , false )
395+ _ , err = setupDBMap .Exec ("INSERT INTO certificateStatus (serial, status, notAfter, lastExpirationNagSent, ocspLastUpdated, revokedDate, revokedReason) VALUES (?,?,?,?,?,?,?)" , serial4String , string (core .OCSPStatusGood ), rawCertD .NotAfter , time.Time {}, time.Time {}, time.Time {}, 0 )
396396 test .AssertNotError (t , err , "Couldn't add certStatusD" )
397397 err = setupDBMap .Insert (fqdnStatusD )
398398 test .AssertNotError (t , err , "Couldn't add fqdnStatusD" )
@@ -549,7 +549,7 @@ func TestCertIsRenewed(t *testing.T) {
549549
550550 err = setupDBMap .Insert (cert )
551551 test .AssertNotError (t , err , fmt .Sprintf ("Couldn't add cert %s" , testData .stringSerial ))
552- _ , err = setupDBMap .Exec ("INSERT INTO certificateStatus (serial, status, lastExpirationNagSent, ocspLastUpdated, revokedDate, revokedReason, LockCol, subscriberApproved ) VALUES (?,?,?,?,?,?,?,? )" , fmt .Sprintf ("%x" , testData .Serial .Bytes ()), string (core .OCSPStatusGood ), time.Time {}, time.Time {}, time.Time {}, 0 , 0 , false )
552+ _ , err = setupDBMap .Exec ("INSERT INTO certificateStatus (serial, status, lastExpirationNagSent, ocspLastUpdated, revokedDate, revokedReason) VALUES (?,?,?,?,?,?)" , fmt .Sprintf ("%x" , testData .Serial .Bytes ()), string (core .OCSPStatusGood ), time.Time {}, time.Time {}, time.Time {}, 0 )
553553 test .AssertNotError (t , err , fmt .Sprintf ("Couldn't add certStatus %s" , testData .stringSerial ))
554554 err = setupDBMap .Insert (fqdnStatus )
555555 test .AssertNotError (t , err , fmt .Sprintf ("Couldn't add fqdnStatus %s" , testData .stringSerial ))
@@ -608,7 +608,7 @@ func TestLifetimeOfACert(t *testing.T) {
608608 test .AssertNotError (t , err , "sa.NewDbMap failed" )
609609 err = setupDBMap .Insert (certA )
610610 test .AssertNotError (t , err , "unable to insert Certificate" )
611- _ , err = setupDBMap .Exec ("INSERT INTO certificateStatus (serial, status, notAfter, lastExpirationNagSent, ocspLastUpdated, revokedDate, revokedReason, LockCol, subscriberApproved ) VALUES (?,?,?,?,?,?,?,?,? )" , serial1String , string (core .OCSPStatusGood ), rawCertA .NotAfter , time.Time {}, time.Time {}, time.Time {}, 0 , 0 , false )
611+ _ , err = setupDBMap .Exec ("INSERT INTO certificateStatus (serial, status, notAfter, lastExpirationNagSent, ocspLastUpdated, revokedDate, revokedReason) VALUES (?,?,?,?,?,?,?)" , serial1String , string (core .OCSPStatusGood ), rawCertA .NotAfter , time.Time {}, time.Time {}, time.Time {}, 0 )
612612 test .AssertNotError (t , err , "unable to insert CertificateStatus" )
613613
614614 type lifeTest struct {
@@ -709,7 +709,7 @@ func TestDontFindRevokedCert(t *testing.T) {
709709 test .AssertNotError (t , err , "sa.NewDbMap failed" )
710710 err = setupDBMap .Insert (certA )
711711 test .AssertNotError (t , err , "unable to insert Certificate" )
712- _ , err = setupDBMap .Exec ("INSERT INTO certificateStatus (serial,status, lastExpirationNagSent, ocspLastUpdated, revokedDate, revokedReason, LockCol, subscriberApproved ) VALUES (?,?,?,?,?,?,?,? )" , serial1String , string (core .OCSPStatusRevoked ), time.Time {}, time.Time {}, time.Time {}, 0 , 0 , false )
712+ _ , err = setupDBMap .Exec ("INSERT INTO certificateStatus (serial,status, lastExpirationNagSent, ocspLastUpdated, revokedDate, revokedReason) VALUES (?,?,?,?,?,?)" , serial1String , string (core .OCSPStatusRevoked ), time.Time {}, time.Time {}, time.Time {}, 0 )
713713 test .AssertNotError (t , err , "unable to insert CertificateStatus" )
714714
715715 err = testCtx .m .findExpiringCertificates ()
@@ -773,9 +773,9 @@ func TestDedupOnRegistration(t *testing.T) {
773773 test .AssertNotError (t , err , "Couldn't add certA" )
774774 err = setupDBMap .Insert (certB )
775775 test .AssertNotError (t , err , "Couldn't add certB" )
776- _ , err = setupDBMap .Exec ("INSERT INTO certificateStatus (serial, lastExpirationNagSent, status, notAfter, ocspLastUpdated, revokedDate, revokedReason, LockCol, subscriberApproved ) VALUES (?,?,?,?,?,?,?,?,? )" , serial1String , time .Unix (0 , 0 ), string (core .OCSPStatusGood ), rawCertA .NotAfter , time.Time {}, time.Time {}, 0 , 0 , false )
776+ _ , err = setupDBMap .Exec ("INSERT INTO certificateStatus (serial, lastExpirationNagSent, status, notAfter, ocspLastUpdated, revokedDate, revokedReason) VALUES (?,?,?,?,?,?,?)" , serial1String , time .Unix (0 , 0 ), string (core .OCSPStatusGood ), rawCertA .NotAfter , time.Time {}, time.Time {}, 0 )
777777 test .AssertNotError (t , err , "Couldn't add certStatusA" )
778- _ , err = setupDBMap .Exec ("INSERT INTO certificateStatus (serial, lastExpirationNagSent, status, notAfter, ocspLastUpdated, revokedDate, revokedReason, LockCol, subscriberApproved ) VALUES (?,?,?,?,?,?,?,?,? )" , serial2String , time .Unix (0 , 0 ), string (core .OCSPStatusGood ), rawCertB .NotAfter , time.Time {}, time.Time {}, 0 , 0 , false )
778+ _ , err = setupDBMap .Exec ("INSERT INTO certificateStatus (serial, lastExpirationNagSent, status, notAfter, ocspLastUpdated, revokedDate, revokedReason) VALUES (?,?,?,?,?,?,?)" , serial2String , time .Unix (0 , 0 ), string (core .OCSPStatusGood ), rawCertB .NotAfter , time.Time {}, time.Time {}, 0 )
779779 test .AssertNotError (t , err , "Couldn't add certStatusB" )
780780
781781 err = testCtx .m .findExpiringCertificates ()
0 commit comments