Skip to content

add CEL assertions for test checks - #182

Merged
atkrad merged 3 commits into
mainfrom
add-cel-assertions
Oct 9, 2026
Merged

atkrad merged 3 commits into
mainfrom
add-cel-assertions

Conversation

@atkrad

@atkrad atkrad commented Oct 9, 2026

Copy link
Copy Markdown
Member

Summary

  • Add a test helper that compiles a boolean CEL expression once and checks it against JSON and Kubernetes objects.
  • A canceled context, a non-boolean result, or an integer outside int64 fails the check.
  • cel-go stays in the test module. The deployah binary does not import it.

Test plan

  • Unit tests added/updated
  • Scenario under scenarios/ (if behavior changes)
  • nix run .#lint / pre-commit clean
  • Manual smoke (command + expected result), if user-facing

Labels

  • One of: kind/feature, kind/bug, kind/docs, kind/chore
  • Add breaking-change if this breaks existing CLI or config behavior
  • Add skip-changelog for internal-only PRs that should not appear in notes

Checklist

  • Title is short and imperative (matches commit style)
  • Docs / CLI help updated when user-facing (README.md, docs/cli/)
  • No secrets or local-only paths in the diff

- evaluate boolean expressions without a cluster
- reject missing fields, bad types, and huge integers
- leave DiffSubset and the e2e runner unchanged
@atkrad atkrad added kind/chore Cleanup, deps, CI, or refactor with no user-facing change skip-changelog Exclude this PR from release notes labels Oct 9, 2026
@github-actions github-actions Bot added area/testing Scenarios, harness, goldens area/ci GitHub Actions and release packaging labels Oct 9, 2026
@atkrad atkrad self-assigned this Oct 9, 2026
@codecov

codecov Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.98658% with 3 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
internal/testing/celassert/program.go 97.98% 3 Missing ⚠️

📢 Thoughts on this report? Let us know!

@atkrad
atkrad merged commit edbf599 into main Oct 9, 2026
17 checks passed
@atkrad
atkrad deleted the add-cel-assertions branch October 9, 2026 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ci GitHub Actions and release packaging area/testing Scenarios, harness, goldens kind/chore Cleanup, deps, CI, or refactor with no user-facing change skip-changelog Exclude this PR from release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant