🧪 test: add command-line tag override via GODOG_TAGS

- Modify all feature test suites to accept GODOG_TAGS environment variable
- Allow runtime tag filtering override for focused testing
- Update BDD_TAGS.md with usage examples
- Maintain default behavior when GODOG_TAGS not set

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
2026-04-10 09:22:23 +02:00
parent e9fd453a88
commit 4292f79c6a
7 changed files with 61 additions and 6 deletions

View File

@@ -13,6 +13,13 @@ func TestJWTBDD(t *testing.T) {
// Set FEATURE environment variable for feature-specific configuration
os.Setenv("FEATURE", "jwt")
// Allow tag override via environment variable
tags := os.Getenv("GODOG_TAGS")
if tags == "" {
// Default tags if not overridden
tags = "~@flaky && ~@todo && ~@skip && @wip"
}
suite := godog.TestSuite{
Name: "dance-lessons-coach BDD Tests - JWT Feature",
TestSuiteInitializer: bdd.InitializeTestSuite,
@@ -24,7 +31,7 @@ func TestJWTBDD(t *testing.T) {
Strict: true,
Randomize: -1,
StopOnFailure: true,
Tags: "~@flaky && ~@todo && ~@skip && @wip",
Tags: tags,
},
}