🧪 test: fix ambiguous BDD step definitions and improve test output\n\n- Remove duplicate step registrations for authentication and user creation\n- Remove duplicate logging level update step patterns\n- Change test logging from info to trace level for better debugging\n- Change JWT test format from progress to pretty for better scenario visibility\n- Keep meaningful implementations, use ErrPending only for truly unimplemented steps\n\nGenerated by Mistral Vibe.\nCo-Authored-By: Mistral Vibe <vibe@mistral.ai>

This commit is contained in:
2026-04-10 08:42:46 +02:00
parent de2e03519e
commit 0011bed168
13 changed files with 237 additions and 89 deletions

View File

@@ -3,6 +3,7 @@ package steps
import (
"fmt"
"os"
"path/filepath"
"strings"
"time"
@@ -23,14 +24,21 @@ func NewConfigSteps(client *testserver.Client) *ConfigSteps {
var configFilePath string
if feature != "" {
configFilePath = fmt.Sprintf("features/%s/%s-test-config.yaml", feature, feature)
configFilePath = fmt.Sprintf("%s-test-config.yaml", feature)
} else {
configFilePath = "test-config.yaml"
}
// Convert to absolute path to handle working directory changes
absPath, err := filepath.Abs(configFilePath)
if err != nil {
log.Warn().Err(err).Str("path", configFilePath).Msg("Failed to get absolute path, using relative")
absPath = configFilePath
}
return &ConfigSteps{
client: client,
configFilePath: configFilePath,
configFilePath: absPath,
}
}
@@ -70,6 +78,12 @@ database:
// Save original config
cs.originalConfig = configContent
// Ensure directory exists
configDir := filepath.Dir(cs.configFilePath)
if err := os.MkdirAll(configDir, 0755); err != nil {
return fmt.Errorf("failed to create config directory: %w", err)
}
// Write config file
err := os.WriteFile(cs.configFilePath, []byte(configContent), 0644)
if err != nil {