Skip to content

Commit

Permalink
fix get filter for metric tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gpop63 committed Aug 31, 2022
1 parent 0e82c01 commit e3ea3b8
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func TestGetFilterForMetric(t *testing.T) {
"compute",
"compute.googleapis.com/firewall/dropped_bytes_count",
metricsRequester{config: config{Region: "us-east1"}, logger: logger},
"metric.type=\"compute.googleapis.com/firewall/dropped_bytes_count\" AND resource.labels.zone = starts_with(\"us-east1\")",
"metric.type=\"compute.googleapis.com/firewall/dropped_bytes_count\" AND resource.labels.region = starts_with(\"us-east1\")",
},
{
"pubsub service with region in config",
Expand All @@ -70,14 +70,14 @@ func TestGetFilterForMetric(t *testing.T) {
"compute",
"compute.googleapis.com/firewall/dropped_bytes_count",
metricsRequester{config: config{Region: "us-central1", Zone: "us-central1-a"}, logger: logger},
"metric.type=\"compute.googleapis.com/firewall/dropped_bytes_count\" AND resource.labels.zone = starts_with(\"us-central1\")",
"metric.type=\"compute.googleapis.com/firewall/dropped_bytes_count\" AND resource.labels.region = starts_with(\"us-central1\")",
},
{
"compute uptime with partial region",
"compute",
"compute.googleapis.com/instance/uptime",
metricsRequester{config: config{Region: "us-west"}, logger: logger},
"metric.type=\"compute.googleapis.com/instance/uptime\" AND resource.labels.zone = starts_with(\"us-west\")",
"metric.type=\"compute.googleapis.com/instance/uptime\" AND resource.labels.region = starts_with(\"us-west\")",
},
{
"compute uptime with partial zone",
Expand All @@ -91,7 +91,7 @@ func TestGetFilterForMetric(t *testing.T) {
"compute",
"compute.googleapis.com/instance/uptime",
metricsRequester{config: config{Region: "us-*"}, logger: logger},
"metric.type=\"compute.googleapis.com/instance/uptime\" AND resource.labels.zone = starts_with(\"us-\")",
"metric.type=\"compute.googleapis.com/instance/uptime\" AND resource.labels.region = starts_with(\"us-\")",
},
{
"compute uptime with wildcard in zone",
Expand Down

0 comments on commit e3ea3b8

Please sign in to comment.