Merge current v2.11 into v3.1

This commit is contained in:
romain 2024-08-28 16:11:38 +02:00
commit 85f4fd0979
40 changed files with 114 additions and 116 deletions

View file

@ -199,7 +199,7 @@ func TestLoggerHeaderFields(t *testing.T) {
if config.FilePath != "" {
_, err = os.Stat(config.FilePath)
require.NoError(t, err, fmt.Sprintf("logger should create %s", config.FilePath))
require.NoErrorf(t, err, "logger should create %s", config.FilePath)
}
req := &http.Request{
@ -704,7 +704,7 @@ func assertValidLogData(t *testing.T, expected string, logData []byte) {
t.Helper()
if len(expected) == 0 {
assert.Zero(t, len(logData))
assert.Empty(t, logData)
t.Log(string(logData))
return
}
@ -761,7 +761,7 @@ func doLoggingTLSOpt(t *testing.T, config *types.AccessLog, enableTLS bool) {
if config.FilePath != "" {
_, err = os.Stat(config.FilePath)
require.NoError(t, err, fmt.Sprintf("logger should create %s", config.FilePath))
require.NoErrorf(t, err, "logger should create %s", config.FilePath)
}
req := &http.Request{