Skip to content

Add CEL validation tests for ObservabilityPolicy CRD #3735

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

shaun-nx
Copy link
Contributor

@shaun-nx shaun-nx commented Aug 14, 2025

Proposed changes

This change adds test for the CEL validation for the ObservabilityPolicy CR

Closes #3670

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto main
  • I will ensure my PR is targeting the main branch and pulling from my branch from my own fork

@shaun-nx shaun-nx requested a review from a team as a code owner August 14, 2025 10:50
@shaun-nx shaun-nx added the tests Pull requests that update tests label Aug 14, 2025
Copy link

codecov bot commented Aug 14, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.86%. Comparing base (94a2edc) to head (c2286c3).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3735      +/-   ##
==========================================
- Coverage   86.89%   86.86%   -0.04%     
==========================================
  Files         128      128              
  Lines       16187    16187              
  Branches       62       62              
==========================================
- Hits        14066    14061       -5     
- Misses       1949     1953       +4     
- Partials      172      173       +1     

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Collaborator

@sjberman sjberman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like a lot of these separate test functions could just be combined into one, to reduce duplication. They are ultimately formatted and testing very similar things. For example, 3 different test functions that are testing the TargetRef field. Could be one large list of structs in a single test IMO.

@shaun-nx shaun-nx requested a review from sjberman August 18, 2025 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Pull requests that update tests
Projects
Status: 🆕 New
Development

Successfully merging this pull request may close these issues.

Add CEL test for ObservabilityPolicy CRD
3 participants