diff --git a/local-config/jaeger/docker-compose.yml b/local-config/jaeger/docker-compose.yml index 618d443078..67ce110279 100644 --- a/local-config/jaeger/docker-compose.yml +++ b/local-config/jaeger/docker-compose.yml @@ -2,7 +2,7 @@ version: '3' services: postgres: - image: postgres:14 + image: postgres:15.2 environment: POSTGRES_PASSWORD: postgres POSTGRES_USER: postgres diff --git a/server/test/test_repository.go b/server/test/test_repository.go index 0777d19bef..73f9c1ac36 100644 --- a/server/test/test_repository.go +++ b/server/test/test_repository.go @@ -190,7 +190,7 @@ func (r *repository) GetAugmented(ctx context.Context, id id.ID) (Test, error) { return r.get(ctx, id) } -const sortQuery = `ORDER BY t.version DESC LIMIT 1` +const sortQuery = ` ORDER BY t.version DESC LIMIT 1` func (r *repository) get(ctx context.Context, id id.ID) (Test, error) { query, params := sqlutil.TenantWithPrefix(ctx, getTestSQL+" WHERE t.id = $1", "t.", id) @@ -204,7 +204,7 @@ func (r *repository) get(ctx context.Context, id id.ID) (Test, error) { } func (r *repository) GetTestSuiteSteps(ctx context.Context, id id.ID, version int) ([]Test, error) { - sortQuery := `ORDER BY ts.step_number ASC` + sortQuery := ` ORDER BY ts.step_number ASC` query, params := sqlutil.TenantWithPrefix(ctx, getTestSQL+testMaxVersionQuery+` INNER JOIN test_suite_steps ts ON t.id = ts.test_id WHERE ts.test_suite_id = $1 AND ts.test_suite_version = $2`, "t.", id, version) stmt, err := r.db.Prepare(query + sortQuery) diff --git a/server/testsuite/testsuite_run_repository.go b/server/testsuite/testsuite_run_repository.go index 8050aa6535..40a19d2b26 100644 --- a/server/testsuite/testsuite_run_repository.go +++ b/server/testsuite/testsuite_run_repository.go @@ -345,7 +345,7 @@ func (td *RunRepository) GetTestSuiteRun(ctx context.Context, ID id.ID, runID in } func (td *RunRepository) GetLatestRunByTestSuiteVersion(ctx context.Context, ID id.ID, version int) (TestSuiteRun, error) { - sortQuery := "ORDER BY created_at DESC LIMIT 1" + sortQuery := " ORDER BY created_at DESC LIMIT 1" query, params := sqlutil.Tenant(ctx, selectTestSuiteRunQuery+" WHERE test_suite_id = $1 AND test_suite_version = $2", ID, version) stmt, err := td.db.Prepare(query + sortQuery) if err != nil {