Skip to content

Commit af725dd

Browse files
AnnatarHeclaude
andcommitted
fix(test): add LogCleanup to mocked config in track_test
The gc command now requires LogCleanup config to be present. Update the mock to include proper LogCleanup defaults. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 8055c17 commit af725dd

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

commands/track_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,16 @@ func (s *trackTestSuite) TestTrackWithSendData() {
122122
}))
123123
defer server.Close()
124124
cs := model.NewMockConfigService(s.T())
125+
truthy := true
125126
mockedConfig := model.ShellTimeConfig{
126127
Token: "TOKEN001",
127128
APIEndpoint: server.URL,
128129
FlushCount: 7,
129130
GCTime: 8,
131+
LogCleanup: &model.LogCleanup{
132+
Enabled: &truthy,
133+
ThresholdMB: 100,
134+
},
130135
}
131136
cs.On("ReadConfigFile", mock.Anything).Return(mockedConfig, nil)
132137
model.UserShellTimeConfig = mockedConfig

0 commit comments

Comments
 (0)