-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ref/tests(metrics_extraction): Reduce changes when adjusting spec versions #63947
Conversation
01f39f0
to
820bdbb
Compare
@@ -122,14 +122,17 @@ def test_get_metric_extraction_config_single_alert(default_project: Project) -> | |||
config = get_metric_extraction_config(default_project) | |||
|
|||
assert config | |||
assert len(config["metrics"]) == 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this PR, I'm removing all instances of checking for the length of the metrics if we check for the contents of it right after.
@@ -122,14 +122,17 @@ def test_get_metric_extraction_config_single_alert(default_project: Project) -> | |||
config = get_metric_extraction_config(default_project) | |||
|
|||
assert config | |||
assert len(config["metrics"]) == 1 | |||
assert config["metrics"][0] == { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm removing accessing indices from config metrics to make diffs easier when adjusting the number of specs.
We're adding a new spec version for widgets in #63774, this change will make the diff easier when adding and removing spec versions for both alerts and widgets.