feat: add 4 grade things

This commit is contained in:
TAskMAster339
2026-10-18 19:23:27 +03:00
parent e3cd2516ba
commit 4d91357932
23 changed files with 2015 additions and 140 deletions
+8
View File
@@ -58,6 +58,7 @@ func newTestFixture(t *testing.T) *testFixture {
t.Fatal(err)
}
cfg.ConnConfig.RuntimeParams["search_path"] = schema
cfg.ConnConfig.RuntimeParams["application_name"] = schema
db, err := pgxpool.NewWithConfig(ctx, cfg)
if err != nil {
t.Fatal(err)
@@ -92,6 +93,13 @@ func newTestFixture(t *testing.T) *testFixture {
if _, err = db.Exec(ctx, string(ddl)); err != nil {
t.Fatal(err)
}
ddl, err = os.ReadFile("../repositories/migrations/000005_upload_attempts.up.sql")
if err != nil {
t.Fatal(err)
}
if _, err = db.Exec(ctx, string(ddl)); err != nil {
t.Fatal(err)
}
t.Cleanup(func() { _ = redisClient.Close() })
if err := redisClient.Ping(ctx).Err(); err != nil {
t.Fatal(err)