@@ -684,8 +684,9 @@ func (m *TestDatabaseManager) Cleanup(ctx context.Context) {
684684
685685// SetupTestDatabaseFromEnv creates a database from environment config and returns a cleanup function
686686// Usage:
687- // cleanup := SetupTestDatabaseFromEnv(t, ctx, "my-test-db")
688- // defer cleanup()
687+ //
688+ // cleanup := SetupTestDatabaseFromEnv(t, ctx, "my-test-db")
689+ // defer cleanup()
689690func SetupTestDatabaseFromEnv (t * testing.T , ctx context.Context , databaseName string ) (bdbID int , cleanup func ()) {
690691 // Get environment config
691692 envConfig , err := GetEnvConfig ()
@@ -743,8 +744,9 @@ func SetupTestDatabaseFromEnv(t *testing.T, ctx context.Context, databaseName st
743744
744745// SetupTestDatabaseWithConfig creates a database with custom config and returns a cleanup function
745746// Usage:
746- // bdbID, cleanup := SetupTestDatabaseWithConfig(t, ctx, dbConfig)
747- // defer cleanup()
747+ //
748+ // bdbID, cleanup := SetupTestDatabaseWithConfig(t, ctx, dbConfig)
749+ // defer cleanup()
748750func SetupTestDatabaseWithConfig (t * testing.T , ctx context.Context , dbConfig DatabaseConfig ) (bdbID int , cleanup func ()) {
749751 // Create fault injector
750752 faultInjector , err := CreateTestFaultInjector ()
@@ -772,8 +774,9 @@ func SetupTestDatabaseWithConfig(t *testing.T, ctx context.Context, dbConfig Dat
772774// SetupTestDatabaseAndFactory creates a database from environment config and returns both bdbID, factory, and cleanup function
773775// This is the recommended way to setup tests as it ensures the client factory connects to the newly created database
774776// Usage:
775- // bdbID, factory, cleanup := SetupTestDatabaseAndFactory(t, ctx, "standalone")
776- // defer cleanup()
777+ //
778+ // bdbID, factory, cleanup := SetupTestDatabaseAndFactory(t, ctx, "standalone")
779+ // defer cleanup()
777780func SetupTestDatabaseAndFactory (t * testing.T , ctx context.Context , databaseName string ) (bdbID int , factory * ClientFactory , cleanup func ()) {
778781 // Create the database
779782 bdbID , cleanupDB := SetupTestDatabaseFromEnv (t , ctx , databaseName )
@@ -796,8 +799,9 @@ func SetupTestDatabaseAndFactory(t *testing.T, ctx context.Context, databaseName
796799
797800// SetupTestDatabaseAndFactoryWithConfig creates a database with custom config and returns both bdbID, factory, and cleanup function
798801// Usage:
799- // bdbID, factory, cleanup := SetupTestDatabaseAndFactoryWithConfig(t, ctx, "standalone", dbConfig)
800- // defer cleanup()
802+ //
803+ // bdbID, factory, cleanup := SetupTestDatabaseAndFactoryWithConfig(t, ctx, "standalone", dbConfig)
804+ // defer cleanup()
801805func SetupTestDatabaseAndFactoryWithConfig (t * testing.T , ctx context.Context , databaseName string , dbConfig DatabaseConfig ) (bdbID int , factory * ClientFactory , cleanup func ()) {
802806 // Create the database
803807 bdbID , cleanupDB := SetupTestDatabaseWithConfig (t , ctx , dbConfig )
0 commit comments