matching_app/internal/adapter/database/repository_test.go
2025-05-02 15:12:18 +07:00

21 lines
504 B
Go

package database
import (
"context"
"github.com/stretchr/testify/assert"
"testing"
)
func TestConnectionPool(t *testing.T) {
// Test với connection pool mock
t.Run("Get connection pool", func(t *testing.T) {
pool := GetConnectionPool()
assert.Nil(t, pool) // Pool chưa được khởi tạo
})
t.Run("Initialize pool", func(t *testing.T) {
err := InitPool(context.Background(), "invalid_connection_string")
assert.Error(t, err, "Expected error with invalid connection string")
})
}