Tagging: `--include-tags` does not override the option set in sbt
Hello,
In my use-case I want to have two set of integration tests:
- Ones that I can run entirely locally. No tags set.
- Others that require connecting to a real testing environment. Tests tagged with
uat-integration.
By default I want to skip tests in 2. but optionally override the sbt command to run those same tests. As in:
IntegrationTest / testOptions += Tests.Argument("--exclude-tags=uat-integration"), // also works albeit different from the docs
And then:
$ sbt "it:test -- --include-tags=uat-integration"
However, it seems that the parameter does not override the default option. Passing parameters to sbt is a bit finicky so I might be wrong as well.
My current workaround is to create a custom sbt task LocalIntegrationTest that excludes the tag (however I wanted to avoid that approach). I might be approaching munit incorrectly therefore I look forward for your feedback.
If the problem is not clear, I can setup a sample project with this scenario when I get the chance.
I no longer have a need for this but leave the issue open as it documents unexpected behaviour as far as I can tell.