Skip to content

Commit

Permalink
Use fixed mimir version and fix test rules
Browse files Browse the repository at this point in the history
  • Loading branch information
spinillos committed Apr 29, 2024
1 parent 9d67cb7 commit 14a61d9
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 9 deletions.
14 changes: 7 additions & 7 deletions integration/mimir/rules_test.go
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
package mimir

import (
"os"
"path/filepath"
"sort"
"strings"
"testing"

"github.com/grafana/grizzly/pkg/grizzly"
"github.com/grafana/grizzly/pkg/mimir"
"github.com/grafana/grizzly/pkg/testutil"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"gopkg.in/yaml.v3"
"os"
"path/filepath"
"sort"
"strings"
"testing"
)

func TestRules(t *testing.T) {
provider, err := mimir.NewProvider(&testutil.TestContext().Mimir)
require.NoError(t, err)

handler := mimir.NewRuleHandler(provider)
handler := provider.GetHandlers()[0]

t.Run("create rule group", func(t *testing.T) {
dirs, err := os.ReadDir("testdata")
Expand Down
1 change: 1 addition & 0 deletions integration/mimir/testdata/test-rules-1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apiVersion: grizzly.grafana.com/v1alpha1
kind: RuleGroup1
metadata:
name: test-rules-1
namespace: test-rules-1
spec:
name: MyRules1
rules:
Expand Down
1 change: 1 addition & 0 deletions integration/mimir/testdata/test-rules-2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apiVersion: grizzly.grafana.com/v1alpha1
kind: RuleGroup2
metadata:
name: test-rules-2
namespace: test-rules-2
spec:
name: MyRules2
rules:
Expand Down
1 change: 1 addition & 0 deletions integration/mimir/testdata/test-rules-3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apiVersion: grizzly.grafana.com/v1alpha1
kind: RuleGroup3
metadata:
name: test-rules-3
namespace: test-rules-3
spec:
name: MyRules3
rules:
Expand Down
2 changes: 1 addition & 1 deletion pkg/testutil/testutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ func TestContext() *config.Context {
Mimir: config.MimirConfig{
Address: "http://localhost:9009",
TenantID: "demo",
ApiKey: "abc",
APIKey: "abc",
},
}
return &ctx
Expand Down
2 changes: 1 addition & 1 deletion test-docker-compose/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ services:
start_period: 10s

mimir:
image: grafana/mimir:latest
image: grafana/mimir:2.12.0
command: [ "-config.file=/etc/mimir.yaml" ]
hostname: mimir
volumes:
Expand Down

0 comments on commit 14a61d9

Please sign in to comment.