Skip to content

Commit 5f4f185

Browse files
jan-gRafalKorepta
authored andcommitted
Drop tests for older versions
We don't support not having the shadow index cache. Remove that test case. Bump the "restricted redpanda version" test to lie within the new version range.
1 parent 6e9586e commit 5f4f185

File tree

3 files changed

+4
-12
lines changed

3 files changed

+4
-12
lines changed

operator/internal/controller/vectorized/test/cluster_controller_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -838,9 +838,9 @@ var _ = Describe("RedPandaCluster controller", func() {
838838
})
839839

840840
Context("Calling reconcile with restricted version", func() {
841-
const allowedVersion = "v23.1.1"
841+
const allowedVersion = "v23.2.1"
842842
It("Should throw error due to restricted redpanda version", func() {
843-
restrictedVersion := "v23.1.2"
843+
restrictedVersion := "v23.2.2"
844844
key, redpandaCluster := getVersionedRedpanda("restricted-redpanda-negative", restrictedVersion)
845845
fc := fake.NewClientBuilder().WithObjects(redpandaCluster).WithStatusSubresource(redpandaCluster).Build()
846846
r := &vectorized.ClusterReconciler{

operator/pkg/resources/configuration/configuration_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,9 @@ import (
2222
)
2323

2424
func TestConfigMode(t *testing.T) {
25-
config := configuration.For("v22.1.1-test")
25+
// Older values aren't supported
26+
config := configuration.For("v23.2.1-test")
2627
assert.Equal(t, config.Mode, configuration.DefaultCentralizedMode())
27-
config = configuration.For("v21.1.1-test")
28-
assert.Equal(t, config.Mode, configuration.GlobalConfigurationModeClassic)
2928
}
3029

3130
func TestRedpandaProperties(t *testing.T) {

operator/pkg/resources/statefulset_test.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,6 @@ func TestEnsure(t *testing.T) {
9999
}
100100
noSidecarSts := stsFromCluster(noSidecarCluster)
101101

102-
withoutShadowIndexCacheDirectory := cluster.DeepCopy()
103-
withoutShadowIndexCacheDirectory.Spec.Version = "v21.10.1"
104-
stsWithoutSecondPersistentVolume := stsFromCluster(withoutShadowIndexCacheDirectory)
105-
// Remove shadow-indexing-cache from the volume claim templates
106-
stsWithoutSecondPersistentVolume.Spec.VolumeClaimTemplates = stsWithoutSecondPersistentVolume.Spec.VolumeClaimTemplates[:1]
107-
108102
unhealthyRedpandaCluster := cluster.DeepCopy()
109103

110104
tests := []struct {
@@ -121,7 +115,6 @@ func TestEnsure(t *testing.T) {
121115
{"update resources", stsResource, resourcesUpdatedCluster, resourcesUpdatedSts, true, nil, "first"},
122116
{"update redpanda resources", stsResource, resourcesUpdatedRedpandaCluster, resourcesUpdatedSts, true, nil, "first"},
123117
{"disabled sidecar", nil, noSidecarCluster, noSidecarSts, true, nil, "first"},
124-
{"cluster without shadow index cache dir", stsResource, withoutShadowIndexCacheDirectory, stsWithoutSecondPersistentVolume, true, nil, "first"},
125118
{"update non healthy cluster", stsResource, unhealthyRedpandaCluster, stsResource, false, &resources.RequeueAfterError{
126119
RequeueAfter: resources.RequeueDuration,
127120
Msg: "wait for cluster to become healthy (cluster restarting)",

0 commit comments

Comments
 (0)