From f013a1771dba8420ea2d603328b303b8af73ddb0 Mon Sep 17 00:00:00 2001 From: Gabriel Radureau Date: Wed, 8 Apr 2026 12:05:11 +0200 Subject: [PATCH] fixed bdd tests --- pkg/bdd/steps/steps.go | 2 +- scripts/run-bdd-tests.sh | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/bdd/steps/steps.go b/pkg/bdd/steps/steps.go index e96d2f4..3e66289 100644 --- a/pkg/bdd/steps/steps.go +++ b/pkg/bdd/steps/steps.go @@ -77,7 +77,7 @@ func InitializeAllSteps(ctx *godog.ScenarioContext, client *testserver.Client) { ctx.Step(`^I authenticate with username "([^"]*)" and password "([^"]*)" again$`, sc.authSteps.iAuthenticateWithUsernameAndPasswordAgain) // Common steps - ctx.Step(`^the response should be "{\"([^"]*)\":\"([^"]*)"}"$`, sc.commonSteps.theResponseShouldBe) + ctx.Step(`^the response should be "{\\"([^"]*)":\\"([^"]*)"}"$`, sc.commonSteps.theResponseShouldBe) ctx.Step(`^the response should contain error "([^"]*)"$`, sc.commonSteps.theResponseShouldContainError) ctx.Step(`^the status code should be (\d+)$`, sc.commonSteps.theStatusCodeShouldBe) } diff --git a/scripts/run-bdd-tests.sh b/scripts/run-bdd-tests.sh index a685393..0c6bc8e 100755 --- a/scripts/run-bdd-tests.sh +++ b/scripts/run-bdd-tests.sh @@ -6,7 +6,7 @@ set -e echo "๐Ÿงช Running BDD Tests..." -cd /Users/gabrielradureau/Work/Vibe/dance-lessons-coach +cd /Users/gabrielradureau/Work/Vibe/DanceLessonsCoach # Check if PostgreSQL container is running, start it if not echo "๐Ÿ‹ Checking PostgreSQL container..." @@ -90,5 +90,6 @@ if [ $test_exit_code -eq 0 ]; then exit 0 else echo "โŒ BDD tests failed" + echo 'DLC_DATABASE_HOST=localhost DLC_DATABASE_PORT=5432 DLC_DATABASE_USER=postgres DLC_DATABASE_PASSWORD=postgres DLC_DATABASE_NAME=dance_lessons_coach_bdd_test DLC_DATABASE_SSL_MODE=disable go test ./features/... -v' exit 1 fi