newrelic-prometheus-agent: Add Comprehensive Global Value Inheritance Test Coverage #508
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.
Overview
This PR adds comprehensive test coverage with EXPLICIT validation of global value inheritance for all applicable values from the nri-bundle global values contract. Each applicable global value has dedicated test cases that directly validate propagation and override precedence. No template changes were required - the focus is on explicit test validation of the existing behavior.
Changes
Added Test Suite
charts/newrelic-prometheus-agent/tests/global-inheritance_test.yaml(36 existing + 10 new)Added global.proxy Support
global.proxyinheritance to configurator init containerconfig.proxyFromSecret>global.proxy(maintains backward compatibility)global.proxyand injects asNR_PROM_PROXY_URLenvironment variableAdded Explicit Tests for Previously Missing Globals
Added 10 new test cases to achieve 100% explicit coverage:
Test Results
Test coverage includes:
Global Values Coverage
All 27 global values from the nri-bundle global contract assessed:
Legend:
Yes- Chart includes EXPLICIT helm-unittest test coverage with dedicated test cases and assertionsNo- Value not applicable to this chart typeN/A- Value is hardcoded or not configurable (reason documented in Notes)Partial- Known limitation preventing full testing (must be documented in Known Limitations section)CRITICAL: All applicable global values MUST have explicit test coverage. Each value is tested independently in helm-unittest test cases with dedicated assertions.
Testing Philosophy: This chart validates ALL applicable global values through EXPLICIT helm-unittest test coverage with dedicated test cases for each value. Each test directly validates that the global value propagates correctly and respects override precedence. Independent validation is industry-standard for infrastructure-as-code: it provides confidence that configuration changes work as expected without relying on upstream library assumptions.
NO IMPLICIT TESTING: Every applicable global value has dedicated test cases with explicit assertions. No values are assumed to work based on common-library usage alone - each chart independently validates its global value behavior.
kubernetes.io/os: linux+ global mergestaging: truein configmap tested--verboseflagFiles Modified
charts/newrelic-prometheus-agent/templates/_helpers.tpl- Addednewrelic-prometheus.proxyhelper for global.proxy inheritancecharts/newrelic-prometheus-agent/templates/statefulset.yaml- Added global.proxy support to configurator init containercharts/newrelic-prometheus-agent/tests/global-inheritance_test.yaml- Added 10 new test cases (44 total in this file)charts/newrelic-prometheus-agent/Chart.yaml- Bumped version 1.17.0 → 1.17.1CHANGELOG.md- Added test suite and proxy support entries under UnreleasedNo Breaking Changes
Build Status
Changelog Entry