Files
dance-lessons-coach/pkg/bdd/testserver/config_test.go
Gabriel Radureau dbadff58e2 🔍 feat(bdd): add state tracer and fix config reload timing
- Add STATE_TRACER_README.md with full documentation
- Add state_tracer.go for per-process BDD execution tracing to $TMPDIR
- Integrate tracing hooks in suite.go (SCENARIO_START/END, JWT_RESET, DB_CLEANUP)
- Fix config_steps.go: increase file recreation delay to 1100ms for 1s polling interval
- Fix config_test.go: update expected values to match current implementation
- Document findings: sequential per-feature execution, shared DB, in-memory JWT secrets
- Identify root causes of intermittent failures

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-04-11 10:25:27 +02:00

21 lines
535 B
Go

package testserver
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestCreateTestConfig(t *testing.T) {
// Test 1: Default config (no test config file)
t.Run("DefaultConfig", func(t *testing.T) {
cfg := createTestConfig(9999)
assert.Equal(t, "0.0.0.0", cfg.Server.Host)
assert.Equal(t, 9999, cfg.Server.Port)
assert.Equal(t, "test-secret-key-for-bdd-tests", cfg.Auth.JWTSecret)
assert.Equal(t, "admin123", cfg.Auth.AdminMasterPassword)
assert.Equal(t, "dance_lessons_coach", cfg.Database.Name)
})
}