Skip to content

Commit

Permalink
Fixed broken test.
Browse files Browse the repository at this point in the history
Signed-off-by: Bartlomiej Plotka <[email protected]>
  • Loading branch information
bwplotka committed Mar 16, 2020
1 parent 2dc375b commit 1227553
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 61 deletions.
2 changes: 1 addition & 1 deletion pkg/rule/api/v1_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ func testEndpoints(t *testing.T, api *API) {
testutil.Ok(t, err)
got, err := json.Marshal(test.response)
testutil.Ok(t, err)
testutil.Equals(t, exp, got)
testutil.Equals(t, string(exp), string(got))
})
}
}
Expand Down
115 changes: 57 additions & 58 deletions pkg/store/storepb/rules.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/store/storepb/rules.proto
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ message Alert {
message RecordingRule {
string name = 1 [(gogoproto.jsontag) = "name" ];
string query = 2 [(gogoproto.jsontag) = "query" ];
PromLabels labels = 3 [(gogoproto.jsontag) = "labels,omitempty" ];
PromLabels labels = 3 [(gogoproto.jsontag) = "labels" ];
string health = 4 [(gogoproto.jsontag) = "health" ];
string last_error = 5 [(gogoproto.jsontag) = "lastError,omitempty" ];
double evaluation_duration_seconds = 6 [(gogoproto.jsontag) = "evaluationTime" ];
Expand Down
2 changes: 1 addition & 1 deletion pkg/testutil/testpromcompatibility/api_compatibility.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ type AlertingRule struct {
type RecordingRule struct {
Name string `json:"name"`
Query string `json:"query"`
Labels labels.Labels `json:"labels,omitempty"`
Labels labels.Labels `json:"labels"`
Health rules.RuleHealth `json:"health"`
LastError string `json:"lastError,omitempty"`
EvaluationTime float64 `json:"evaluationTime"`
Expand Down

0 comments on commit 1227553

Please sign in to comment.