Skip to content

Commit

Permalink
Update tag to 1.23.0 and fix medusa tests
Browse files Browse the repository at this point in the history
  • Loading branch information
burmanm committed Nov 26, 2024
1 parent ec6e2ad commit d8eff49
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
23 changes: 12 additions & 11 deletions controllers/medusa/medusarestorejob_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ package medusa

import (
"context"
"k8s.io/apimachinery/pkg/api/errors"
"sync"
"testing"
"time"

"k8s.io/apimachinery/pkg/api/errors"

cassdcapi "github.com/k8ssandra/cass-operator/apis/cassandra/v1beta1"
k8ss "github.com/k8ssandra/k8ssandra-operator/apis/k8ssandra/v1alpha1"
api "github.com/k8ssandra/k8ssandra-operator/apis/medusa/v1alpha1"
Expand Down Expand Up @@ -156,15 +157,15 @@ func testMedusaRestoreDatacenter(t *testing.T, ctx context.Context, f *framework
backup.Status.TotalNodes = dc1.Spec.Size
backup.Status.Nodes = []*api.MedusaBackupNode{
{
Datacenter: "real-dc1",
Datacenter: "dc1",
Rack: "default",
},
{
Datacenter: "real-dc1",
Datacenter: "dc1",
Rack: "default",
},
{
Datacenter: "real-dc1",
Datacenter: "dc1",
Rack: "default",
},
}
Expand Down Expand Up @@ -195,7 +196,7 @@ func testMedusaRestoreDatacenter(t *testing.T, ctx context.Context, f *framework
}), timeout*5, interval, "timed out waiting for CassandraDatacenter stopped flag to be set")

t.Log("delete datacenter pods to simulate shutdown")
err = f.DeleteAllOf(ctx, dc1Key.K8sContext, &corev1.Pod{}, client.InNamespace(namespace), client.MatchingLabels{cassdcapi.DatacenterLabel: "real-dc1"})
err = f.DeleteAllOf(ctx, dc1Key.K8sContext, &corev1.Pod{}, client.InNamespace(namespace), client.MatchingLabels{cassdcapi.DatacenterLabel: "dc1"})
require.NoError(err, "failed to delete datacenter pods")

restore = &api.MedusaRestoreJob{}
Expand Down Expand Up @@ -463,15 +464,15 @@ func testValidationErrorStopsRestore(t *testing.T, ctx context.Context, f *frame
backup.Status.TotalNodes = dc1.Spec.Size
backup.Status.Nodes = []*api.MedusaBackupNode{
{
Datacenter: "real-dc1",
Datacenter: "dc1",
Rack: "default",
},
{
Datacenter: "real-dc1",
Datacenter: "dc1",
Rack: "default",
},
{
Datacenter: "real-dc1",
Datacenter: "dc1",
Rack: "default",
},
}
Expand Down Expand Up @@ -636,13 +637,13 @@ func (c *fakeMedusaRestoreClient) GetBackups(ctx context.Context) ([]*medusa.Bac
Status: *medusa.StatusType_SUCCESS.Enum(),
Nodes: []*medusa.BackupNode{
{
Host: "node1", Datacenter: "real-dc1", Rack: "rack1",
Host: "node1", Datacenter: "dc1", Rack: "rack1",
},
{
Host: "node2", Datacenter: "real-dc1", Rack: "rack1",
Host: "node2", Datacenter: "dc1", Rack: "rack1",
},
{
Host: "node3", Datacenter: "real-dc1", Rack: "rack1",
Host: "node3", Datacenter: "dc1", Rack: "rack1",
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion pkg/test/testenv.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ import (
const (
clustersToCreate = 3
clusterProtoName = "cluster-%d-%s"
cassOperatorVersion = "v1.22.4"
cassOperatorVersion = "v1.23.0"
prometheusOperatorVersion = "v0.9.0"
)

Expand Down

0 comments on commit d8eff49

Please sign in to comment.