fix: logging module

This commit is contained in:
mayur.popli
2025-03-23 18:40:43 +05:30
parent 08db0c6d46
commit 5267940da3
2 changed files with 12 additions and 11 deletions

View File

@@ -192,15 +192,15 @@ func TestRequest(t *testing.T) {
var found bool
for _, line := range lines {
logEntry := parseLogLine(t, line)
if logEntry["level"] == "debug" && strings.Contains(logEntry["message"].(string), "Debugf message") {
if logEntry["message"] == "HTTP Request" || logEntry["method"] == "POST" {
found = true
break
}
}
if !found {
t.Errorf("expected formatted debug message, but it was not found in logs")
}
}
func TestResponse(t *testing.T) {