🧪 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

@@ -124,8 +124,7 @@ func InitializeAllSteps(ctx *godog.ScenarioContext, client *testserver.Client) {
ctx.Step(`^the cleanup interval is set to (\d+) minutes$`, sc.jwtRetentionSteps.theCleanupIntervalIsSetToMinutes)
ctx.Step(`^it should be removed within (\d+) minutes$`, sc.jwtRetentionSteps.itShouldBeRemovedWithinMinutes)
ctx.Step(`^I should see cleanup events every (\d+) minutes$`, sc.jwtRetentionSteps.iShouldSeeCleanupEventsEveryMinutes)
ctx.Step(`^a user "([^"]*)" exists with password "([^"]*)"$`, sc.jwtRetentionSteps.aUserExistsWithPassword)
ctx.Step(`^I authenticate with username "([^"]*)" and password "([^"]*)"$`, sc.jwtRetentionSteps.iAuthenticateWithUsernameAndPassword)
// Removed duplicate user creation and authentication steps - using authSteps versions from lines 60 and 61
ctx.Step(`^I receive a valid JWT token signed with current secret$`, sc.jwtRetentionSteps.iReceiveAValidJWTTokenSignedWithCurrentSecret)
ctx.Step(`^I wait for the secret to expire$`, sc.jwtRetentionSteps.iWaitForTheSecretToExpire)
ctx.Step(`^I try to validate the expired token$`, sc.jwtRetentionSteps.iTryToValidateTheExpiredToken)
@@ -245,7 +244,7 @@ func InitializeAllSteps(ctx *godog.ScenarioContext, client *testserver.Client) {
ctx.Step(`^the server port should remain unchanged$`, sc.configSteps.theServerPortShouldRemainUnchanged)
ctx.Step(`^the server should continue running on the original port$`, sc.configSteps.theServerShouldContinueRunningOnTheOriginalPort)
ctx.Step(`^a warning should be logged about ignored configuration change$`, sc.configSteps.aWarningShouldBeLoggedAboutIgnoredConfigurationChange)
ctx.Step(`^I update the logging level to "([^"]*)" in the config file$`, sc.configSteps.iUpdateTheLoggingLevelToInvalidLevelInTheConfigFile)
// Removed duplicate logging level update step - using the main version that handles both valid and invalid levels
ctx.Step(`^the logging level should remain unchanged$`, sc.configSteps.theLoggingLevelShouldRemainUnchanged)
ctx.Step(`^an error should be logged about invalid configuration$`, sc.configSteps.anErrorShouldBeLoggedAboutInvalidConfiguration)
ctx.Step(`^the server should continue running normally$`, sc.configSteps.theServerShouldContinueRunningNormally)