Skip to content

Conversation

aakash070
Copy link
Collaborator

@aakash070 aakash070 commented Apr 2, 2025

This change adds a test runner library under tools/celtest which provides native language support for setting up and executing tests.

  1. The library makes use of the compiler tool for setting up the CEL runtime environment.
  2. It also provides callback options for augmenting the test runner with test suite path, test suite parser, file descriptor set path.

The change also includes a test harness in YAML which aligns with cel.expr.conformance.test.TestSuite.
The following changes will be raised separately:

  1. The bazel rule to trigger the test runner with parameterized options
  2. Sample usages for triggering test runner library for policies, expressions and compiled expressions.

Copy link
Collaborator

@TristonianJones TristonianJones left a comment

Choose a reason for hiding this comment

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

Please add test cases for the test_runner.go and compiler.go as part of this PR. Thank you!

@aakash070
Copy link
Collaborator Author

@TristonianJones I have added tests for test_runner.go. Tests existed for compiler.go.
I have moved one of the tests for custom policy metadata options from compiler to test_runner. Please check.

@TristonianJones TristonianJones merged commit 2aa9572 into google:master Apr 15, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants