test: refactor selfmonitor tests with shared helpers and HTTP 400/429 fault injection#3132
Open
jeffreylimnardy wants to merge 88 commits intokyma-project:mainfrom
Open
test: refactor selfmonitor tests with shared helpers and HTTP 400/429 fault injection#3132jeffreylimnardy wants to merge 88 commits intokyma-project:mainfrom
jeffreylimnardy wants to merge 88 commits intokyma-project:mainfrom
Conversation
skhalash
previously approved these changes
Mar 12, 2026
Add WithStartFaulted() to faultbackend so the backend starts rejecting requests immediately, and skipHealthyBaseline flag to outage tests to skip the assertPipelineHealthy wait. This avoids the 5-minute rate() window decay that would otherwise delay alert firing. fluent-bit-all-data-dropped still requires a healthy baseline since the dropped_records metric series does not exist until the exporter has been active.
…us 3 / k8s 1.34 compatibility
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.
Description
Changes proposed in this pull request (what was done and why):
flowHealthyThenDegraded,assertFlowDegraded,buildPipeline,defaultGenerator,assertComponentReady,assertPipelineHealthy) that eliminate repetition across outage, backpressure, and healthy test scenariosNoLogsDelivered(TCP close on port 9880) andBufferFillingUp(HTTP 429 retries + delayed 200 responses) without requiring Istioapp.kubernetes.io/name: telemetry-metric-agent): the metric-agent and gateway share the same backend, so faulting it at the backend level would affect both legs; a source-label-scoped VirtualService selectively blocks only agent→gateway traffic while leaving the gateway's own exports healthyfluent-bit-buffer-filling-up(429 retryable + delayed 200 to hold the queue full) andfluent-bit-data-dropped(400 non-retryable drop)fluent-bit-no-logs-delivered(TCP close, simulating ECONNREFUSED-like behavior) andfluent-bit-all-data-dropped(100% HTTP 400)WithFluentBitHostPathCleanupto clear/var/telemetry-fluent-biton nodes after Fluent Bit tests, preventing buffer state bleed between test runsFlowHealthConditionTransitionTimeout(10 min) inperiodic.goto replace duplicated inline10*time.MinuteconstantsChanges refer to particular issues, PRs or documents:
Traceability
Related Issuessection.