Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,5 @@ replace (
k8s.io/metrics => k8s.io/metrics v0.18.6
k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.18.6
github.com/datastax/cass-operator => github.com/jsanda/cass-operator v1.0.1-0.20201111154347-91205f4d8f1e
github.com/k8ssandra/reaper-client-go => github.com/burmanm/reaper-client-go v0.3.1-0.20201202113256-e98a624e553c
)
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ github.com/bshuster-repo/logrus-logstash-hook v0.4.1/go.mod h1:zsTqEiSzDgAa/8GZR
github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8=
github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b/go.mod h1:obH5gd0BsqsP2LwDJ9aOkm/6J86V6lyAXCoQWGw3K50=
github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE=
github.com/burmanm/reaper-client-go v0.3.1-0.20201202113256-e98a624e553c h1:VX6zPyR05ze04bSREqy9l9Aflf1TFMKsk4CJ+NN7dg8=
github.com/burmanm/reaper-client-go v0.3.1-0.20201202113256-e98a624e553c/go.mod h1:1yol6YTcKcLOmPH9CfAdeFnVg/KCCTSbIUXMsF1cKII=
github.com/caddyserver/caddy v1.0.3/go.mod h1:G+ouvOY32gENkJC+jhgl62TyhvqEsFaDiZ4uw0RzP1E=
github.com/campoy/embedmd v1.0.0/go.mod h1:oxyr9RCiSXg0M3VJ3ks0UGfp98BpSSGr0kpiX3MzVl8=
github.com/cenkalti/backoff v0.0.0-20181003080854-62661b46c409/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM=
Expand Down
2 changes: 1 addition & 1 deletion pkg/reconcile/reconcilers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ func TestNewDeployment(t *testing.T) {
Value: "false",
},
{
Name: "REAPER_AUTO_SCHEDULING_ENABLED",
Name: "REAPER_AUTO_SCHEDULING_ENABLED",
Value: "true",
},
})
Expand Down
14 changes: 14 additions & 0 deletions test/e2e/deploy_reaper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ package e2e

import (
"context"
"fmt"
"time"

reapergo "github.com/k8ssandra/reaper-client-go/reaper"

api "github.com/k8ssandra/reaper-operator/api/v1alpha1"
"github.com/k8ssandra/reaper-operator/test/framework"
. "github.com/onsi/ginkgo"
Expand Down Expand Up @@ -76,6 +79,9 @@ var _ = Describe("Deploy Reaper with Cassandra backend", func() {
Name: cassdc.Name,
},
},
AutoScheduling: &api.AutoScheduler{
Enabled: true,
},
},
},
}
Expand All @@ -93,6 +99,14 @@ var _ = Describe("Deploy Reaper with Cassandra backend", func() {
return len(reaper.Status.Clusters) == 1 && reaper.Status.Clusters[0] == cassdc.Spec.ClusterName
})
Expect(err).ToNot(HaveOccurred(), "failing waiting for cluster to get registered")

By("verify from reaper that the cluster has scheduling")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do think it makes sense to have separate e2e tests where auto scheduling is enabled and not enabled.

reaperSvc := reaper.Name + "-reaper-service" + "." + reaper.Namespace
reaperClient, err := reapergo.NewReaperClient(fmt.Sprintf("http://%s:8080", reaperSvc))
Expect(err).To(BeNil())
schedules, err := reaperClient.RepairSchedulesPerCluster(context.Background(), cassdc.Spec.ClusterName)
Expect(err).To(BeNil())
Expect(len(schedules) > 0).To(BeTrue())
})
})
})