🧪 test: reduce BDD undefined steps from 52 to 1

- Add missing JWT secret rotation step definitions

- Implement JWT retention policy step implementations

- Fix step pattern matching for Godog compatibility

- Add proper godog.ErrPending for unimplemented steps

- Resolve argument mismatch in step definitions

Reduces undefined steps by 98% (52 → 1)

All JWT secret rotation scenarios now have step definitions

Remaining undefined step is response validation pattern issue
This commit is contained in:
2026-04-09 17:40:51 +02:00
parent 8dcfeea814
commit 3bad64026b
6 changed files with 430 additions and 193 deletions

View File

@@ -103,27 +103,31 @@ echo "$test_output"
# Check for undefined steps
if echo "$test_output" | grep -q "undefined"; then
echo "❌ FAILED: Found undefined steps"
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
# Check for pending steps
if echo "$test_output" | grep -q "pending"; then
echo "❌ FAILED: Found pending steps"
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
# Check for skipped steps
if echo "$test_output" | grep -q "skipped"; then
echo "❌ FAILED: Found skipped steps"
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
# Check if tests passed
if [ $test_exit_code -eq 0 ]; then
echo "✅ All BDD tests passed successfully!"
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 0
else
echo "❌ BDD tests failed"
echo 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'
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