Skip to content

Add test cases for testing RBAC preauthorization #1923

Closed
@trgeiger

Description

@trgeiger

Follow-up to #1858

We need to add a few more test cases and DRY up the mock preauthorizer. Per Joe's comment on 1858:

  1. "Consolidate noOpPreAuthorizer and errorPreAuthorizer into a single struct (maybe mockPreAuthorizer?) that has fields for missingRules and err. Then populate them according to the desired test scenario
  2. We should have tests at this level for:
    • missingRules: nil, err: non-nil -> error result includes err (we have this now)
    • missingRules: non-nil, err: nil -> error result includes missing rules
    • missingRules: non-nil, err: non-nil -> error result includes missing rules and err
    • missingRules: nil, err: nil -> no error (we have this now)"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions