Skip to content

Commit

Permalink
Check for tenant labels
Browse files Browse the repository at this point in the history
Signed-off-by: Jéssica Lins <jessicaalins@gmail.com>
  • Loading branch information
jessicalins committed Jan 24, 2022
1 parent 063a88e commit 7d50a67
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/e2e/rules_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ func TestRulesAPI(t *testing.T) {
bodyStr := string(body)

assertResponse(t, bodyStr, "sum by (job) (http_inprogress_requests)")
assertResponse(t, bodyStr, "tenant_id: "+defaultTenantID)
})

t.Run("read-write-alerting-rules", func(t *testing.T) {
Expand Down Expand Up @@ -117,6 +118,7 @@ func TestRulesAPI(t *testing.T) {
body, err := ioutil.ReadAll(res.Body)
bodyStr := string(body)
assertResponse(t, bodyStr, "alert: HighRequestLatency")
assertResponse(t, bodyStr, "tenant_id: "+defaultTenantID)
})

t.Run("read-write-recording-and-alerting-rules", func(t *testing.T) {
Expand Down Expand Up @@ -151,6 +153,7 @@ func TestRulesAPI(t *testing.T) {
bodyStr := string(body)
assertResponse(t, bodyStr, "record: job:up:avg")
assertResponse(t, bodyStr, "alert: ManyInstancesDown")
assertResponse(t, bodyStr, "tenant_id: "+defaultTenantID)
})

t.Run("write-invalid-rules", func(t *testing.T) {
Expand Down

0 comments on commit 7d50a67

Please sign in to comment.