Skip to content

chore: Improve test structure#696

Draft
dbudziwojskiNR wants to merge 15 commits intomainfrom
dbudziwojski/improve-tests
Draft

chore: Improve test structure#696
dbudziwojskiNR wants to merge 15 commits intomainfrom
dbudziwojski/improve-tests

Conversation

@dbudziwojskiNR
Copy link
Contributor

@dbudziwojskiNR dbudziwojskiNR commented Feb 4, 2026

Description

Type of change

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • New feature / enhancement (non-breaking change which adds functionality)
  • Security fix
  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • Add changelog entry following the contributing guide
  • Documentation has been updated
  • This change requires changes in testing:
    • unit tests
    • E2E tests

dpacheconr and others added 13 commits October 4, 2023 10:08
…Account

Enables the webhook job ServiceAccount to inherit global.serviceAccount.annotations,
which is critical for IAM role integration in cloud environments:
- IRSA (AWS EKS)
- Workload Identity (GCP GKE)
- Pod Identity (Azure AKS)

The ServiceAccount template now includes the common-library helper for annotations,
properly merging global annotations with the existing helm hook annotations.

Changes:
- Add serviceAccount.annotations inheritance to job-patch/serviceaccount.yaml
- Add test suite for serviceAccount annotations inheritance
- Fix pre-existing test error (notExists -> isNull in webhook_test.yaml)

Test Coverage:
- Global annotations inheritance validated
- Annotation merge behavior with helm hooks validated
- All 62 tests passing (10 test suites)
- Add global-inheritance_test.yaml with 20 tests covering cluster, labels,
  podLabels, images.registry, images.pullSecrets, priorityClassName,
  hostNetwork, dnsConfig, nodeSelector, and affinity
- Add serviceaccount-global_test.yaml with 4 tests for serviceAccount.create
- All 15 applicable global values now have explicit helm-unittest coverage
- Tests verify both inheritance (global applies when local omitted) and
  precedence (local overrides global when both set)
- Test results: 86/86 passing (24 new tests added)
- Achieves 100% global values test coverage for this chart
…notations' into fix/global-serviceaccount-annotations
# Conflicts:
#	CHANGELOG.md
#	charts/nri-metadata-injection/tests/affinity_test.yaml
#	charts/nri-metadata-injection/tests/annotations_test.yaml
#	charts/nri-metadata-injection/tests/dns_config_test.yaml
#	charts/nri-metadata-injection/tests/images_test.yaml
#	charts/nri-metadata-injection/tests/labels_test.yaml
#	charts/nri-metadata-injection/tests/node_selector_test.yaml
#	charts/nri-metadata-injection/tests/priority_class_test.yaml
#	charts/nri-metadata-injection/tests/serviceaccount_test.yaml
#	charts/nri-metadata-injection/tests/tolerations_test.yaml
@codecov
Copy link

codecov bot commented Feb 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 51.93%. Comparing base (1c9f3fa) to head (8cdd038).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #696   +/-   ##
=======================================
  Coverage   51.93%   51.93%           
=======================================
  Files           3        3           
  Lines         233      233           
=======================================
  Hits          121      121           
  Misses        107      107           
  Partials        5        5           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments