newrelic-k8s-metrics-adapter: Add Comprehensive Global Value Inheritance Test Coverage#448
Open
dpacheconr wants to merge 3 commits intonewrelic:mainfrom
Open
Conversation
Contributor
|
Added to backlog |
…heritance tests - Added 30 new test cases validating global value inheritance - Covers cluster, images, scheduling, security contexts, labels - All 63 tests passing (33 existing + 30 new) - Bumped chart version 1.13.6 → 1.13.7 - Updated CHANGELOG.md with test suite entry Test coverage includes: - Global value propagation when local values not set - Local value override precedence - Default behavior validation - Chart-specific edge cases (kubernetes.io/os: linux default) Known limitation documented: global.verboseLog not inherited (chart doesn't use common-library helper) All applicable global values tested with 100% pass rate.
- Changed deployment.yaml to use newrelic.common.verboseLog helper - Changed values.yaml verboseLog default from false to null for global inheritance - Added 4 comprehensive tests validating default, inheritance, and precedence - All 67 tests passing (Local > Global > Default precedence verified)
…ecretName test, and fix createSecret helper - Rebase onto main - Fix createSecret helper: returned string "false" which is truthy in Go templates; now returns empty string for the falsy case - Add YAML anchors (&base/<<: *base) to new test file - Add test asserting actual personalAPIKey value in secret - Add test verifying customSecretName suppresses secret creation
d75e7a2 to
e70861a
Compare
Contributor
Author
|
Rebased onto main. Fixed a bug in the |
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.
Overview
This PR adds comprehensive test coverage validating global value inheritance for all applicable values from the nri-bundle global values contract and fixes a bug where `global.verboseLog` was not being inherited. It also fixes a bug in the `createSecret` helper introduced in main where the string `"false"` was returned for the falsy case — in Go templates, any non-empty string is truthy, so the secret creation guard never worked correctly when `customSecretName` was set.
Changes
Bug Fixes
Added Test Suite
New File: `tests/global-inheritance_test.yaml`
Test Results
```
Charts: 1 passed, 1 total
Test Suites: 13 passed, 13 total
Tests: 69 passed, 69 total
Pass Rate: 100%
```
Global Values Coverage
All 27 global values from the nri-bundle global contract assessed:
Legend:
Files Modified
Template Files
Configuration Files
New Test Files
Tests: 69/69 passing (100%)
Lint: Passing (helm lint)
Coverage: 18/18 applicable global values (100%)