Skip to content

Commit

Permalink
fix basic ThanosRuler e2e test
Browse files Browse the repository at this point in the history
The test was producing a nil pointer due to the
replicas field not being set.
  • Loading branch information
pgier committed Feb 4, 2020
1 parent 58e96ae commit e92f260
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/e2e/thanosruler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func testTRCreateDeleteCluster(t *testing.T) {

name := "test"

if _, err := framework.CreateThanosRulerAndWaitUntilReady(ns, framework.MakeBasicThanosRuler(name)); err != nil {
if _, err := framework.CreateThanosRulerAndWaitUntilReady(ns, framework.MakeBasicThanosRuler(name, 1)); err != nil {
t.Fatal(err)
}

Expand Down
3 changes: 2 additions & 1 deletion test/framework/thanosruler.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,13 @@ import (
"github.com/pkg/errors"
)

func (f *Framework) MakeBasicThanosRuler(name string) *monitoringv1.ThanosRuler {
func (f *Framework) MakeBasicThanosRuler(name string, replicas int32) *monitoringv1.ThanosRuler {
return &monitoringv1.ThanosRuler{
ObjectMeta: metav1.ObjectMeta{
Name: name,
},
Spec: monitoringv1.ThanosRulerSpec{
Replicas: &replicas,
QueryEndpoints: []string{"test"},
LogLevel: "debug",
},
Expand Down

0 comments on commit e92f260

Please sign in to comment.