Files
releases/docs/projects/regal/rules/testing/todo-test.md
T
Charlie Egan 5951e5dee8 docs: Add Regal docs to OPA site (#7874)
This will show the project under /projects/, where some other upcoming
additions will have their docs too.

Signed-off-by: Charlie Egan <charlieegan3@users.noreply.github.com>
Co-authored-by: Charlie Egan <charlieegan3@users.noreply.github.com>
2025-09-02 17:41:06 +02:00

939 B

todo-test

Summary: TODO test encountered

Category: Testing

Avoid

package policy_test

import data.policy

# Make sure this passes
todo_test_allow_if_admin {
    policy.allow with input as {"user": {"roles": ["admin"]}}
}

Rationale

Writing TODO tests by prefixing todo_ to any test is a good way to keep track of tests that need to be written while developing policy. They are however not to be committed, and should be removed before submitting the change for review.

Configuration Options

This linter rule provides the following configuration options:

rules:
  testing:
    todo-test:
      # one of "error", "warning", "ignore"
      level: error