consistent test style

This commit is contained in:
Roland Shoemaker 2015-05-04 15:17:20 -07:00
parent ca21cce198
commit 8290206ef8
1 changed files with 2 additions and 4 deletions

View File

@ -157,11 +157,9 @@ func TestAddCertificate(t *testing.T) {
// TestGetCertificateByShortSerial tests some failure conditions for GetCertificate. // TestGetCertificateByShortSerial tests some failure conditions for GetCertificate.
// Success conditions are tested above in TestAddCertificate. // Success conditions are tested above in TestAddCertificate.
func TestGetCertificateByShortSerial(t *testing.T) { func TestGetCertificateByShortSerial(t *testing.T) {
sa, err := NewSQLStorageAuthority("sqlite3", ":memory:") sa := initSA(t)
test.AssertNotError(t, err, "Failed to create SA")
sa.InitTables()
_, err = sa.GetCertificateByShortSerial("") _, err := sa.GetCertificateByShortSerial("")
test.AssertError(t, err, "Should've failed on empty serial") test.AssertError(t, err, "Should've failed on empty serial")
_, err = sa.GetCertificateByShortSerial("01020304050607080102030405060708") _, err = sa.GetCertificateByShortSerial("01020304050607080102030405060708")