Skip to content

Should allow skipping tests that require admin credentials #208

Description

@mandre

Some of the tests require admin credentials. We should find a way to skip these tests when running against clouds for which we don't have admin credentials.

Activity

  1. mandre commented on Jan 31, 2025

    @mandre
    CollaboratorAuthor

    Might be possible via the (undocumented) TestFile selector introduced in kudobuilder/kuttl#483.

  2. mandre commented on Jan 31, 2025

    @mandre
    CollaboratorAuthor

    I'm trying to leverage the TestFile selector in a way that's not too awful but I'm getting nowhere.

  3. mandre commented on Oct 23, 2026

    @mandre
    CollaboratorAuthor

    This should now be possible with kuttl v0.28.0

  4. zunken1337 commented on Oct 27, 2026

    @zunken1337
    Contributor

    I have this ready locally with kuttl v0.28: each test that uses openstack-admin gets a 00-test-case.yaml with a testRunSelector (admin NotIn ["false"]), so a run without labels runs everything, and E2E_KUTTL_SKIP_ADMIN=true passes --test-run-labels admin=false. Checked that it skips them. A unit test fails if a test uses openstack-admin without the file.

    Two questions before I open it:

    1. That's 143 new files, one per test, since kuttl can't select a whole directory. OK, or would you prefer something else?
    2. The unit test would turn open PRs that add admin tests red (Add LoadBalancer controller #1018, Add RBACPolicy controller for Neutron RBAC policy support #953, Add DNSZoneShare controller for Designate zone-sharing support #958 among them) until they add the file. Should this go in first, or after those, or without the unit test?
  5. mandre commented on Nov 3, 2026

    @mandre
    CollaboratorAuthor

    @zunken1337 sorry I missed your comment.

    For the 143 new files, this was expected as we need to add one to pretty much each of the tests.

    Regarding your second question, about ordering in which this needs to merge, it's also expected that currently opened PR would conflict when we make a broad change like this affecting all controllers. My priority goes towards necessary broad changes like this one, then we'll adapt the open PRs to match.
    Let's get your fix in once #1037 lands.

    When making your change, don't forget to also update the scaffolding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions