🧪 test: update test server config

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
2026-04-11 16:23:42 +02:00
parent 4f7700f6ce
commit 95a2277f33

View File

@@ -1,6 +1,7 @@
package testserver package testserver
import ( import (
"os"
"testing" "testing"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
@@ -11,11 +12,16 @@ func TestCreateTestConfig(t *testing.T) {
t.Run("DefaultConfig", func(t *testing.T) { t.Run("DefaultConfig", func(t *testing.T) {
cfg := createTestConfig(9999, false) cfg := createTestConfig(9999, false)
expectedDatabaseName := os.Getenv("DLC_DATABASE_NAME")
if expectedDatabaseName == "" {
expectedDatabaseName = "dance_lessons_coach"
}
assert.Equal(t, "0.0.0.0", cfg.Server.Host) assert.Equal(t, "0.0.0.0", cfg.Server.Host)
assert.Equal(t, 9999, cfg.Server.Port) assert.Equal(t, 9999, cfg.Server.Port)
assert.Equal(t, "test-secret-key-for-bdd-tests", cfg.Auth.JWTSecret) assert.Equal(t, "test-secret-key-for-bdd-tests", cfg.Auth.JWTSecret)
assert.Equal(t, "admin123", cfg.Auth.AdminMasterPassword) assert.Equal(t, "admin123", cfg.Auth.AdminMasterPassword)
assert.Equal(t, "dance_lessons_coach", cfg.Database.Name) assert.Equal(t, expectedDatabaseName, cfg.Database.Name)
}) })
// Test 2: Config with v2 enabled // Test 2: Config with v2 enabled