Skip to content

Commit

Permalink
Revert "Comment out unit test that triggers fake client bug"
Browse files Browse the repository at this point in the history
This reverts commit 5b26fd1.
  • Loading branch information
Kidswiss committed Sep 18, 2024
1 parent 5b26fd1 commit c0bfba5
Showing 1 changed file with 34 additions and 36 deletions.
70 changes: 34 additions & 36 deletions pkg/maintenance/postgresql_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -403,42 +403,40 @@ func TestPostgreSQL_DoMaintenance(t *testing.T) {
server: getVersionTestHTTPServer(t),
shouldSkipRepack: true,
},
// This test fills up the watcher channel, which is currently hardcoded to size 100
// See https://github.com/kubernetes/kubernetes/issues/116700
// {
// name: "GivenMaintenanceTooLong_WithUnrelatedSecupdate_ThenExpectNoRepack",
// maintTimeout: 2 * time.Second,
// objs: []client.Object{
// &stackgresv1.SGCluster{
// ObjectMeta: metav1.ObjectMeta{
// Name: "cluster",
// Namespace: "default",
// },
// Spec: stackgresv1.SGClusterSpec{
// Postgres: stackgresv1.SGClusterSpecPostgres{
// Version: "15.0",
// },
// },
// },
// &stackgresv1.SGDbOps{
// ObjectMeta: metav1.ObjectMeta{
// Name: "unrelated-securitymaintenance",
// Namespace: "default",
// },
// Spec: stackgresv1.SGDbOpsSpec{
// Op: "securityUpgrade",
// SgCluster: "cluster",
// MaxRetries: pointer.Int(1),
// SecurityUpgrade: &stackgresv1.SGDbOpsSpecSecurityUpgrade{
// Method: pointer.String("InPlace"),
// },
// },
// },
// },
// server: getVersionTestHTTPServer(t),
// updatedOps: "securityUpgrade",
// shouldSkipRepack: true,
// },
{
name: "GivenMaintenanceTooLong_WithUnrelatedSecupdate_ThenExpectNoRepack",
maintTimeout: 2 * time.Second,
objs: []client.Object{
&stackgresv1.SGCluster{
ObjectMeta: metav1.ObjectMeta{
Name: "cluster",
Namespace: "default",
},
Spec: stackgresv1.SGClusterSpec{
Postgres: stackgresv1.SGClusterSpecPostgres{
Version: "15.0",
},
},
},
&stackgresv1.SGDbOps{
ObjectMeta: metav1.ObjectMeta{
Name: "unrelated-securitymaintenance",
Namespace: "default",
},
Spec: stackgresv1.SGDbOpsSpec{
Op: "securityUpgrade",
SgCluster: "cluster",
MaxRetries: pointer.Int(1),
SecurityUpgrade: &stackgresv1.SGDbOpsSpecSecurityUpgrade{
Method: pointer.String("InPlace"),
},
},
},
},
server: getVersionTestHTTPServer(t),
updatedOps: "securityUpgrade",
shouldSkipRepack: true,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand Down

0 comments on commit c0bfba5

Please sign in to comment.