about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBaitinq <manuelpalenzuelamerino@gmail.com>2024-05-20 22:36:18 +0200
committerBaitinq <manuelpalenzuelamerino@gmail.com>2024-05-20 22:36:18 +0200
commit6bb644277b27699a93a823c6286cda6518472217 (patch)
tree129a4a9f9f7ea9e678c66515100cdd088f9dc569
parentpayloads-processor: connect to DB and insert dummy data (diff)
downloadfs-tracer-backend-6bb644277b27699a93a823c6286cda6518472217.tar.gz
fs-tracer-backend-6bb644277b27699a93a823c6286cda6518472217.tar.bz2
fs-tracer-backend-6bb644277b27699a93a823c6286cda6518472217.zip
cleanup
-rw-r--r--TODO1
-rw-r--r--src/payload-processor/processor/processor_test.go6
2 files changed, 4 insertions, 3 deletions
diff --git a/TODO b/TODO
index b130e70..980b2e1 100644
--- a/TODO
+++ b/TODO
@@ -1,4 +1,3 @@
 better managing of secrets (maybe we shouldnt have environment variables)
 add db migrations
-add db tests
 nixos-k3s repo
diff --git a/src/payload-processor/processor/processor_test.go b/src/payload-processor/processor/processor_test.go
index 5e954c4..5fa34a8 100644
--- a/src/payload-processor/processor/processor_test.go
+++ b/src/payload-processor/processor/processor_test.go
@@ -18,9 +18,11 @@ func TestProcessMessage(t *testing.T) {
 
 	message := []byte("test")
 
-	mockdb.EXPECT().TestInsert(gomock.Any(), string(message)).Return(nil)
+	ctx := context.Background()
 
-	err := processor.handleMessage(context.Background(), kafka.Message{Value: message})
+	mockdb.EXPECT().TestInsert(ctx, string(message)).Return(nil)
+
+	err := processor.handleMessage(ctx, kafka.Message{Value: message})
 
 	require.NoError(t, err)
 }