Files
dance-lessons-coach/pkg/bdd/suite.go
Gabriel Radureau 157d8e2d19
Some checks failed
CI/CD Pipeline / CI Pipeline (push) Failing after 4m0s
🔧 chore: update all references from DanceLessonsCoach to dance-lessons-coach
2026-04-06 17:27:07 +02:00

31 lines
590 B
Go

package bdd
import (
"dance-lessons-coach/pkg/bdd/steps"
"dance-lessons-coach/pkg/bdd/testserver"
"github.com/cucumber/godog"
)
var sharedServer *testserver.Server
func InitializeTestSuite(ctx *godog.TestSuiteContext) {
ctx.BeforeSuite(func() {
sharedServer = testserver.NewServer()
if err := sharedServer.Start(); err != nil {
panic(err)
}
})
ctx.AfterSuite(func() {
if sharedServer != nil {
sharedServer.Stop()
}
})
}
func InitializeScenario(ctx *godog.ScenarioContext) {
client := testserver.NewClient(sharedServer)
steps.InitializeAllSteps(ctx, client)
}