PostgreSQL backup tool with Point-In-Time-Recovery and restore verification
TypeScript backupbackupsdatabasedatabase-backupdevopsdockergolangkubernetesmariadbmongodbmysqlpgpostgrespostgresqls3self-hostedsystem-administrationtoolsweb-ui
FIX (verification): Align agent DTO field with backend postgresqlLogical key
Rostislav Duginba2bc063a0d6
diff --git a/agent/verification/internal/features/api/api_test.go b/agent/verification/internal/features/api/api_test.goindex 9a7db373..e94db7ed 100644--- a/agent/verification/internal/features/api/api_test.go+++ b/agent/verification/internal/features/api/api_test.go@@ -82,8 +82,8 @@ func Test_ClaimVerification_WhenServer200_SendsNestedMaxRamMbAndDeserializes(t *assert.InDelta(t, 120.5, assignment.BackupSizeMb, 0.001)assert.InDelta(t, 800.25, assignment.MaxContainerDiskMb, 0.001)assert.Equal(t, "POSTGRES_LOGICAL", assignment.Database.Type)- require.NotNil(t, assignment.Database.Postgresql)- assert.Equal(t, "16", assignment.Database.Postgresql.Version)+ require.NotNil(t, assignment.Database.PostgresqlLogical)+ assert.Equal(t, "16", assignment.Database.PostgresqlLogical.Version)}func Test_ClaimVerification_WhenServer204_ReturnsNilNoError(t *testing.T) {diff --git a/agent/verification/internal/features/api/dto.go b/agent/verification/internal/features/api/dto.goindex 810aa8c4..760f2833 100644--- a/agent/verification/internal/features/api/dto.go+++ b/agent/verification/internal/features/api/dto.go@@ -41,8 +41,8 @@ type AssignedPostgresql struct {}type AssignedDatabase struct {- Type string `json:"type"`- Postgresql *AssignedPostgresql `json:"postgresql"`+ Type string `json:"type"`+ PostgresqlLogical *AssignedPostgresql `json:"postgresqlLogical"`}type JobAssignment struct {diff --git a/agent/verification/internal/features/runner/concurrent_restores_integration_test.go b/agent/verification/internal/features/runner/concurrent_restores_integration_test.goindex 771edfb2..8a154406 100644--- a/agent/verification/internal/features/runner/concurrent_restores_integration_test.go+++ b/agent/verification/internal/features/runner/concurrent_restores_integration_test.go@@ -202,8 +202,8 @@ func makeConcurrentAssignment(id uuid.UUID) *api.JobAssignment {BackupSizeMb: 1,MaxContainerDiskMb: 0,Database: api.AssignedDatabase{- Type: "POSTGRES_LOGICAL",- Postgresql: &api.AssignedPostgresql{Version: "16"},+ Type: "POSTGRES_LOGICAL",+ PostgresqlLogical: &api.AssignedPostgresql{Version: "16"},},}}diff --git a/agent/verification/internal/features/runner/runner.go b/agent/verification/internal/features/runner/runner.goindex 5670d190..da718650 100644--- a/agent/verification/internal/features/runner/runner.go+++ b/agent/verification/internal/features/runner/runner.go@@ -532,15 +532,15 @@ func pgMajorFromDatabase(db api.AssignedDatabase) (string, error) {return "", fmt.Errorf("unsupported database type %q (v1 is Postgres only)", db.Type)}- if db.Postgresql == nil || db.Postgresql.Version == "" {+ if db.PostgresqlLogical == nil || db.PostgresqlLogical.Version == "" {return "", errors.New("assignment missing postgresql version")}- if !slices.Contains(supportedMajors, db.Postgresql.Version) {- return "", fmt.Errorf("unsupported postgres major %q", db.Postgresql.Version)+ if !slices.Contains(supportedMajors, db.PostgresqlLogical.Version) {+ return "", fmt.Errorf("unsupported postgres major %q", db.PostgresqlLogical.Version)}- return db.Postgresql.Version, nil+ return db.PostgresqlLogical.Version, nil}func backupDownloadBackoff(attempt int) time.Duration {diff --git a/agent/verification/internal/features/runner/runner_test.go b/agent/verification/internal/features/runner/runner_test.goindex 9cff5723..34d94e26 100644--- a/agent/verification/internal/features/runner/runner_test.go+++ b/agent/verification/internal/features/runner/runner_test.go@@ -33,8 +33,8 @@ func postgresJob() *api.JobAssignment {BackupSizeMb: 50,MaxContainerDiskMb: 200,Database: api.AssignedDatabase{- Type: "POSTGRES_LOGICAL",- Postgresql: &api.AssignedPostgresql{Version: "16"},+ Type: "POSTGRES_LOGICAL",+ PostgresqlLogical: &api.AssignedPostgresql{Version: "16"},},}}