chore: assert the on_init collector reaches the exporter - #150
Merged
Conversation
The weak go_goroutines assertion only proved the exporter was serving. The metrics plugin is on the plain-struct RPC line now, so the test polls for the foo_bar_test counter the on_init script declares.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #150 +/- ##
=======================================
Coverage 88.20% 88.20%
=======================================
Files 4 4
Lines 178 178
=======================================
Hits 157 157
Misses 21 21 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TestOnInitRunsWithMetricsEndpoint only asserted go_goroutines, which proves the exporter is serving but says nothing about the on_init script. The weak assertion existed because the metrics plugin used to resolve api-go beta.13 while spiral/roadrunner-metrics speaks the v1 line, so the Declare message decoded empty. Master pins metrics beta.6 with the plain-struct RPC now, so the test polls for the foo_bar_test counter the script actually declares.
Cannot run this locally (no ext-sockets in the local PHP, which the goridge SocketRelay in the fixture needs), so CI is the proof here.