Skip to content

Commit 31650ab

Browse files
committed
server: Fix TestLogRotation error message in Go 1.24
The embedded structure is now also part of the log message. The failure from the tests is the following: --- FAIL: TestLogRotation (0.00s) --- FAIL: TestLogRotation/invalid_logger_config (0.00s) config_test.go:868: test "invalid logger config", expected error: invalid log rotation config: json: cannot unmarshal bool into Go struct field logRotationConfig.maxsize of type int, got: invalid log rotation config: json: cannot unmarshal bool into Go struct field logRotationConfig.Logger.maxsize of type int FAIL Signed-off-by: Ivan Valdes <[email protected]>
1 parent 0287731 commit 31650ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/embed/config_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -843,7 +843,7 @@ func TestLogRotation(t *testing.T) {
843843
logOutputs: []string{"/tmp/path"},
844844
logRotationConfig: `{"maxsize": true}`,
845845
wantErr: true,
846-
wantErrMsg: errors.New("invalid log rotation config: json: cannot unmarshal bool into Go struct field logRotationConfig.maxsize of type int"),
846+
wantErrMsg: errors.New("invalid log rotation config: json: cannot unmarshal bool into Go struct field logRotationConfig.Logger.maxsize of type int"),
847847
},
848848
{
849849
name: "improperly formatted logger config",

0 commit comments

Comments
 (0)