initial commit
This commit is contained in:
commit
88c14b627e
224 files changed
+17204
No files matched your search
@@ -0,0 +1,22 @@
|
||||
package postgres
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"testing"
|
||||
|
||||
"lincodex/backend/config"
|
||||
"lincodex/backend/internal/port/outbound"
|
||||
)
|
||||
|
||||
func TestHealthCheckerWithoutDatabaseIsNotReady(t *testing.T) {
|
||||
checker, closePool, err := NewHealthChecker(context.Background(), config.Config{})
|
||||
if err != nil {
|
||||
t.Fatalf("NewHealthChecker() error = %v", err)
|
||||
}
|
||||
closePool()
|
||||
|
||||
if err := checker.Check(context.Background()); !errors.Is(err, outbound.ErrNotReady) {
|
||||
t.Fatalf("Check() error = %v, want ErrNotReady", err)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user