本文整理匯總了Golang中github.com/pivotal-golang/lager/lagertest.TestLogger.Fatal方法的典型用法代碼示例。如果您正苦於以下問題:Golang TestLogger.Fatal方法的具體用法?Golang TestLogger.Fatal怎麽用?Golang TestLogger.Fatal使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類github.com/pivotal-golang/lager/lagertest.TestLogger
的用法示例。
在下文中一共展示了TestLogger.Fatal方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1:
db, err = sql.Open(dbDriverName, fmt.Sprintf("%sdiego_%d", dbBaseConnectionString, GinkgoParallelNode()))
Expect(err).NotTo(HaveOccurred())
Expect(db.Ping()).NotTo(HaveOccurred())
encryptionKey, err := encryption.NewKey("label", "passphrase")
Expect(err).NotTo(HaveOccurred())
keyManager, err := encryption.NewKeyManager(encryptionKey, nil)
Expect(err).NotTo(HaveOccurred())
cryptor = encryption.NewCryptor(keyManager, rand.Reader)
serializer = format.NewSerializer(cryptor)
sqlDB = sqldb.NewSQLDB(db, 5, 5, format.ENCRYPTED_PROTO, cryptor, fakeGUIDProvider, fakeClock, dbFlavor)
err = sqlDB.CreateConfigurationsTable(logger)
if err != nil {
logger.Fatal("sql-failed-create-configurations-table", err)
}
// ensures sqlDB matches the db.DB interface
var _ thepackagedb.DB = sqlDB
})
var _ = BeforeEach(func() {
if !test_helpers.UseSQL() {
Skip("SQL Backend not available")
}
migrationsDone := make(chan struct{})
migrationManager := migration.NewManager(logger,
nil,