From 9ef77a798c0480a45666fe30178c2ef63f48ba19 Mon Sep 17 00:00:00 2001 From: Thomas Jackson Date: Thu, 5 Mar 2020 17:02:48 -0800 Subject: [PATCH] Add test case for this issue --- test/testdata/issue_274.test | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 test/testdata/issue_274.test diff --git a/test/testdata/issue_274.test b/test/testdata/issue_274.test new file mode 100644 index 000000000..e8f477ff4 --- /dev/null +++ b/test/testdata/issue_274.test @@ -0,0 +1,18 @@ +# Test for https://github.com/jacksontj/promxy/issues/274 +load 5m + metric_1{a="1"} 1 + metric_10{a="10"} 10 + metric_1000{a="1000"} 1000 + metric_10000{a="10000"} 10000 + +eval instant at 5m avg({__name__=~"metric_.*"}) by (a) + {a="1"} 1 + {a="10"} 10 + {a="1000"} 1000 + {a="10000"} 10000 + +eval instant at 5m avg({__name__=~"metric_.*"}) by (__name__) + metric_1{} 1 + metric_10{} 10 + metric_1000{} 1000 + metric_10000{} 10000