Cleanup ensures the database is deleted (safe to call multiple times)
(ctx context.Context)
| 1022 | |
| 1023 | // Cleanup ensures the database is deleted (safe to call multiple times) |
| 1024 | func (m *TestDatabaseManager) Cleanup(ctx context.Context) { |
| 1025 | if m.createdBdbID != 0 { |
| 1026 | if err := m.DeleteDatabase(ctx); err != nil { |
| 1027 | m.t.Logf("Warning: Failed to cleanup database: %v", err) |
| 1028 | } |
| 1029 | } |
| 1030 | } |
| 1031 | |
| 1032 | // SetupTestDatabaseFromEnv creates a database from environment config and returns a cleanup function |
| 1033 | // Usage: |
no test coverage detected