Skip to content

With MUnit / TestContainersForAll, containers start even if the suite is excluded via categories #171

Closed

Description

Using MUnit and TestContainersForAll, if a test suite is skipped via filtering by category (https://scalameta.org/munit/docs/filtering.html#group-test-suites-with-categories), the containers start up anyway.

It looks like TestContainersForAll only checks that the suite has at least one test without the Ignore tag, but does not consider other ways the suite (or all tests in it) could be skipped:

https://github.com/testcontainers/testcontainers-scala/blob/master/test-framework/munit/src/main/scala/com/dimafeng/testcontainers/munit/TestContainersForAll.scala#L46

Is there some other way to skip a whole test suite and not start up the containers?

(The use case is to be able, by filtering on category, to run only unit tests in an environment that doesn't have Docker.)

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

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions