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

Custom desc + test drying #58

Merged
merged 2 commits into from
Oct 25, 2024
Merged

Custom desc + test drying #58

merged 2 commits into from
Oct 25, 2024

Conversation

johnstonematt
Copy link
Contributor

Having to update the tests after renaming the metrics in #57 was a pain, this makes it easier in future. And just generally makes tests easier to write imo.

@johnstonematt johnstonematt changed the base branch from master to metric-naming October 24, 2024 13:28
{Name: "solana_account_balance", ExpectedResponse: balanceMetricResponse},
collector.NodeVersion.makeCollectionTest(NewLV(1, "1.16.7")),
collector.NodeIsHealthy.makeCollectionTest(NewLV(1, identity)),
collector.NodeNumSlotsBehind.makeCollectionTest(NewLV(0, identity)),
Copy link
Contributor

Choose a reason for hiding this comment

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

I liked the previous tests, mainly because it is so much more obvious to the test reader what you're asserting where here it isn't, but understand why you did it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I do agree that this is more cryptic, but was just very awkward to maintain imo

@johnstonematt johnstonematt merged commit a7cbb1e into metric-naming Oct 25, 2024
2 checks passed
@johnstonematt johnstonematt deleted the custom-desc branch October 25, 2024 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants