🐛 fix: resolve go vet issues with client.LastBody() method calls
Some checks failed
CI/CD Pipeline / Build Docker Cache (push) Successful in 9s
CI/CD Pipeline / CI Pipeline (push) Has been cancelled

This commit is contained in:
2026-04-10 13:46:57 +02:00
parent d51bc23706
commit 2d06925a3f

View File

@@ -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