moonrockz/rego/testing does not have a README file

    TestCaseResult

    type TestCaseResult derive(Eq,
    Debug
    )

    Immutable result of one discovered Rego test rule.

    TestCaseResult::is_error

    fn TestCaseResult::is_error(self : TestCaseResult) -> Bool

    Reports whether this test case raised a runtime error.

    TestCaseResult::is_failed

    fn TestCaseResult::is_failed(self : TestCaseResult) -> Bool

    Reports whether this test case failed.

    TestCaseResult::is_passed

    fn TestCaseResult::is_passed(self : TestCaseResult) -> Bool

    Reports whether this test case passed.

    TestCaseResult::is_skipped

    fn TestCaseResult::is_skipped(self : TestCaseResult) -> Bool

    Reports whether this test case was skipped (todo_test_*).

    TestCaseResult::package_path

    fn TestCaseResult::package_path(self : TestCaseResult) -> String

    Returns the dotted package path (for example "data.auth").

    TestCaseResult::qualified_name

    fn TestCaseResult::qualified_name(self : TestCaseResult) -> String

    Returns the fully qualified rule path (for example "data.auth.test_admin_allowed").

    TestCaseResult::rule_name

    fn TestCaseResult::rule_name(self : TestCaseResult) -> String

    Returns the test rule name (for example "test_admin_allowed").

    TestCaseResult::status

    Returns the outcome status of this test case.

    TestFilter

    type TestFilter derive(Eq, Hash,
    Debug
    )

    Immutable filter selecting which discovered Rego test_* / todo_test_* rules run_tests executes.

    TestFilter::all

    fn TestFilter::all() -> TestFilter

    Matches every discovered test_* and todo_test_* rule.

    TestFilter::matches

    fn TestFilter::matches(self : TestFilter, qualified_name : String) -> Bool

    Reports whether qualified_name (data.<pkg>.<rule>) matches this filter.

    TestFilter::prefix

    fn TestFilter::prefix(prefix : String) -> TestFilter

    Matches test rules whose qualified path (data.<pkg>.<rule>) starts with prefix. A leading "data." is added automatically when omitted; an empty string matches all tests.

    TestFilter::prefix_text

    fn TestFilter::prefix_text(self : TestFilter) -> String?

    Returns the normalized prefix text, or None when matching all tests.

    TestReport

    type TestReport derive(Eq,
    Debug
    )

    Immutable aggregate report returned by run_tests.

    TestReport::all_passed

    fn TestReport::all_passed(self : TestReport) -> Bool

    Reports whether zero test cases failed or errored (skipped tests do not fail a report).

    TestReport::error_count

    fn TestReport::error_count(self : TestReport) -> Int

    Number of test cases with TestStatus::Error.

    TestReport::failed_count

    fn TestReport::failed_count(self : TestReport) -> Int

    Number of test cases with TestStatus::Fail.

    TestReport::passed_count

    fn TestReport::passed_count(self : TestReport) -> Int

    Number of test cases with TestStatus::Pass.

    TestReport::results

    fn TestReport::results(self : TestReport) -> ReadOnlyArray[TestCaseResult]

    Returns all executed and skipped test case results in deterministic sorted order.

    TestReport::skipped_count

    fn TestReport::skipped_count(self : TestReport) -> Int

    Number of test cases with TestStatus::Skip.

    TestReport::total_count

    fn TestReport::total_count(self : TestReport) -> Int

    Total number of test cases included in this report.

    TestStatus

    pub(all) enum TestStatus {
    Pass
    Fail
    Skip
    Error(
    EvalError
    )
    } derive(Eq,
    Debug
    )

    Outcome of one Rego test_* or todo_test_* rule evaluation.
    impl Show for TestStatus

    run_tests

    Pure zero-I/O Rego unit test runner. Discovers every test_* and todo_test_* rule in policy, evaluates each matching test under its own isolated StepBudget and EngineOptions, and returns an immutable TestReport.

    Source Files