Skip to content
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

chore(aci milestone 3): refactor migration helper tests #84048

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

mifu67
Copy link
Contributor

@mifu67 mifu67 commented Jan 24, 2025

Create methods mocking the ACI table data for a dual written AlertRule, AlertRuleTrigger, or integration type AlertRuleTriggerAction.

@mifu67 mifu67 requested a review from a team as a code owner January 24, 2025 23:38
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Jan 24, 2025
@@ -208,6 +210,178 @@ def setUp(self):
alert_rule_trigger=self.alert_rule_trigger_critical,
)

def mock_migrate_alert_rule(self, metric_alert) -> tuple[
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now, these mock migration helpers are pretty closely copying the logic of the actual migration helpers, with a few shortcuts because we can guarantee that correctly written to the database. We may want to hardcode more values or change things around—appreciate guidance on this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant