Fix test mode boulder instances.

Update initialization stanza.
Revert to inmemory sqlite storage for now.
Remove NOT NULL constraint from some fields.
This commit is contained in:
Jacob Hoffman-Andrews 2015-05-01 19:28:10 -07:00
parent 8162c5eca8
commit 7733793bb6
3 changed files with 6 additions and 5 deletions

View File

@ -79,7 +79,7 @@ func main() {
cadb, err := ca.NewCertificateAuthorityDatabaseImpl(auditlogger, c.CA.DBDriver, c.CA.DBName) cadb, err := ca.NewCertificateAuthorityDatabaseImpl(auditlogger, c.CA.DBDriver, c.CA.DBName)
cmd.FailOnError(err, "Failed to create CA database") cmd.FailOnError(err, "Failed to create CA database")
ca, err := ca.NewCertificateAuthorityImpl(auditlogger, c.CA.Server, c.CA.AuthKey, c.CA.Profile, c.CA.SerialPrefix, cadb) ca, err := ca.NewCertificateAuthorityImpl(auditlogger, cadb, c.CA)
cmd.FailOnError(err, "Unable to create CA") cmd.FailOnError(err, "Unable to create CA")
// Wire them up // Wire them up

View File

@ -67,10 +67,11 @@ func (ssa *SQLStorageAuthority) InitTables() (err error) {
statements := []string{ statements := []string{
// Create registrations table // Create registrations table
// TODO: Add NOT NULL to thumbprint and value.
`CREATE TABLE IF NOT EXISTS registrations ( `CREATE TABLE IF NOT EXISTS registrations (
id VARCHAR(255) NOT NULL, id VARCHAR(255) NOT NULL,
thumbprint VARCHAR(255) NOT NULL, thumbprint VARCHAR(255),
value BLOB NOT NULL value BLOB
);`, );`,
// Create pending authorizations table // Create pending authorizations table

View File

@ -41,7 +41,7 @@
"serialPrefix": 255, "serialPrefix": 255,
"profile": "ee", "profile": "ee",
"dbDriver": "sqlite3", "dbDriver": "sqlite3",
"dbName": "boulder-ca.sqlite3", "dbName": ":memory:",
"testMode": true, "testMode": true,
"issuerCert": "test/test-ca.pem", "issuerCert": "test/test-ca.pem",
"_comment": "This should only be present in testMode. In prod use an HSM.", "_comment": "This should only be present in testMode. In prod use an HSM.",
@ -50,7 +50,7 @@
"sa": { "sa": {
"dbDriver": "sqlite3", "dbDriver": "sqlite3",
"dbName": "boulder.sqlite3" "dbName": ":memory:"
}, },
"mail": { "mail": {