Skip to content

Commit

Permalink
test(core): add more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gjasny committed Dec 28, 2023
1 parent 524bba5 commit 48f75a8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/tests/check_label_name_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ TEST_P(CheckLabelNameTest, trailing_invalid_label_name) {
TEST_P(CheckLabelNameTest, good_label_name) {
EXPECT_TRUE(CheckLabelName("type"));
}
TEST_P(CheckLabelNameTest, numeric_label_name) {
EXPECT_FALSE(CheckLabelName("2unlimited"));
}
TEST_P(CheckLabelNameTest, reserved_label_name) {
EXPECT_FALSE(CheckLabelName("__some_reserved_label"));
}
Expand Down
3 changes: 3 additions & 0 deletions core/tests/check_metric_name_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ TEST(CheckMetricNameTest, empty_metric_name) {
TEST(CheckMetricNameTest, good_metric_name) {
EXPECT_TRUE(CheckMetricName("prometheus_notifications_total"));
}
TEST(CheckMetricNameTest, numeric_metric_name) {
EXPECT_FALSE(CheckMetricName("2unlimited"));
}
TEST(CheckMetricNameTest, reserved_metric_name) {
EXPECT_FALSE(CheckMetricName("__some_reserved_metric"));
}
Expand Down

0 comments on commit 48f75a8

Please sign in to comment.