- 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>
42 lines
925 B
Go
42 lines
925 B
Go
package jwt
|
|
|
|
import (
|
|
"os"
|
|
"testing"
|
|
|
|
"dance-lessons-coach/pkg/bdd"
|
|
|
|
"github.com/cucumber/godog"
|
|
)
|
|
|
|
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,
|
|
ScenarioInitializer: bdd.InitializeScenario,
|
|
Options: &godog.Options{
|
|
Format: "pretty",
|
|
Paths: []string{"."},
|
|
TestingT: t,
|
|
Strict: true,
|
|
Randomize: -1,
|
|
StopOnFailure: true,
|
|
Tags: tags,
|
|
},
|
|
}
|
|
|
|
if suite.Run() != 0 {
|
|
t.Fatal("non-zero status returned, failed to run jwt BDD tests")
|
|
}
|
|
}
|