Учесть замечания ревью: читать timestamptz в UTC, встроить списки колонок, не требовать каноническую PHC-строку, уточнить замеры отказов
This commit is contained in:
@@ -31,6 +31,16 @@ func TestMain(m *testing.M) {
|
||||
os.Exit(code)
|
||||
}
|
||||
|
||||
func TestPoolScansTimestamptzInUTC(t *testing.T) {
|
||||
var got time.Time
|
||||
if err := db.Pool.QueryRow(context.Background(), `SELECT now()`).Scan(&got); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if got.Location() != time.UTC {
|
||||
t.Fatalf("timestamptz scanned in %v, want UTC", got.Location())
|
||||
}
|
||||
}
|
||||
|
||||
func TestMigrateIsRepeatable(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
applied, err := postgres.Migrate(ctx, db.Pool)
|
||||
|
||||
Reference in New Issue
Block a user