From 9c4b96e02969f389ed7502ece393532edf78c9c7 Mon Sep 17 00:00:00 2001 From: Caleb Hurshman Date: Wed, 20 Nov 2024 15:42:20 -0500 Subject: [PATCH] fix TestCheckpoint --- receiver/splunksearchapireceiver/receiver_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/receiver/splunksearchapireceiver/receiver_test.go b/receiver/splunksearchapireceiver/receiver_test.go index 1a2c30778..ec531d631 100644 --- a/receiver/splunksearchapireceiver/receiver_test.go +++ b/receiver/splunksearchapireceiver/receiver_test.go @@ -123,6 +123,10 @@ func TestCheckpoint(t *testing.T) { mockStorage := &mockStorage{} ssapireceiver.storageClient = mockStorage mockStorage.On("Set", mock.Anything, eventStorageKey, mock.Anything).Return(nil) + ssapireceiver.checkpointRecord = &EventRecord{ + Offset: 0, + Search: "", + } err := ssapireceiver.checkpoint(context.Background()) require.NoError(t, err) mockStorage.AssertCalled(t, "Set", mock.Anything, eventStorageKey, []byte(`{"offset":0,"search":""}`))