mirror of
https://github.com/lordmathis/lemma.git
synced 2025-11-06 07:54:22 +00:00
Add test postgres db connection
This commit is contained in:
@@ -140,7 +140,7 @@ func TestStructTagsToFields(t *testing.T) {
|
||||
// TestStructQueries tests the struct-based query methods using the test database
|
||||
func TestStructQueries(t *testing.T) {
|
||||
// Setup test database
|
||||
database, err := db.NewTestDB(&mockSecrets{})
|
||||
database, err := db.NewTestSQLiteDB(&mockSecrets{})
|
||||
if err != nil {
|
||||
t.Fatalf("Failed to create test database: %v", err)
|
||||
}
|
||||
@@ -356,7 +356,7 @@ func TestStructQueries(t *testing.T) {
|
||||
|
||||
// TestScanStructsErrors tests error handling for ScanStructs
|
||||
func TestScanStructsErrors(t *testing.T) {
|
||||
database, err := db.NewTestDB(&mockSecrets{})
|
||||
database, err := db.NewTestSQLiteDB(&mockSecrets{})
|
||||
if err != nil {
|
||||
t.Fatalf("Failed to create test database: %v", err)
|
||||
}
|
||||
@@ -421,7 +421,7 @@ func TestScanStructsErrors(t *testing.T) {
|
||||
|
||||
// TestEncryptedFields tests handling of encrypted fields
|
||||
func TestEncryptedFields(t *testing.T) {
|
||||
database, err := db.NewTestDB(&mockSecrets{})
|
||||
database, err := db.NewTestSQLiteDB(&mockSecrets{})
|
||||
if err != nil {
|
||||
t.Fatalf("Failed to create test database: %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user