diff --git a/pkg/bdd/helpers/synchronization.go b/pkg/bdd/helpers/synchronization.go index 864130f..96e75cf 100644 --- a/pkg/bdd/helpers/synchronization.go +++ b/pkg/bdd/helpers/synchronization.go @@ -39,7 +39,7 @@ func waitForConfigReload(client *testserver.Client, timeout time.Duration) error // Get initial config state var initialConfig string if err := client.Request("GET", "/api/config", nil); err == nil { - initialConfig = string(client.LastBody()) + initialConfig = string(client.GetLastBody()) } ticker := time.NewTicker(500 * time.Millisecond) @@ -52,7 +52,7 @@ func waitForConfigReload(client *testserver.Client, timeout time.Duration) error case <-ticker.C: // Check if config has changed if err := client.Request("GET", "/api/config", nil); err == nil { - currentConfig := string(client.LastBody()) + currentConfig := string(client.GetLastBody()) if currentConfig != initialConfig { log.Debug().Msg("Config reload detected") return nil @@ -119,7 +119,7 @@ func waitForJWTToken(client *testserver.Client, timeout time.Duration) error { return fmt.Errorf("JWT token not received after %v: %w", timeout, ctx.Err()) case <-ticker.C: // Check if we have a valid token in the last response - body := client.LastBody() + body := client.GetLastBody() if len(body) > 0 && isValidJWTToken(string(body)) { log.Debug().Msg("Valid JWT token received") return nil