From 0f1e6c6aaaa2263db803a147c40a602896f9df5b Mon Sep 17 00:00:00 2001 From: SoXX Date: Tue, 15 Oct 2024 12:41:01 +0200 Subject: [PATCH] feat(database): tests - now the test against 25 char id length --- pkg/database/scrape_history_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/database/scrape_history_test.go b/pkg/database/scrape_history_test.go index 867a731..e96795e 100644 --- a/pkg/database/scrape_history_test.go +++ b/pkg/database/scrape_history_test.go @@ -81,7 +81,7 @@ func TestCreateScrapeHistory(t *testing.T) { } validScrapeHistory := models.ScrapeHistory{ - ScrapeTaskID: "valid_task_id", + ScrapeTaskID: "000000000000valid_task_id", UserSourceID: validUSerSource.ID, } @@ -181,7 +181,7 @@ func TestGetScrapeHistoryByID(t *testing.T) { } validScrapeHistory := models.ScrapeHistory{ - ScrapeTaskID: "valid_task_id", + ScrapeTaskID: "000000000000valid_task_id", UserSourceID: validUSerSource.ID, } @@ -196,7 +196,7 @@ func TestGetScrapeHistoryByID(t *testing.T) { id models.ScrapeTaskID wantErr bool }{ - {"Valid ID", "valid_task_id", false}, + {"Valid ID", "000000000000valid_task_id", false}, {"Empty ID", "", true}, {"Non-existent ID", "non_existent_id", true}, } @@ -279,7 +279,7 @@ func TestUpdateScrapeHistory(t *testing.T) { } validScrapeHistory := models.ScrapeHistory{ - ScrapeTaskID: "valid_task_id", + ScrapeTaskID: "000000000000valid_task_id", UserSourceID: validUSerSource.ID, } @@ -380,7 +380,7 @@ func TestDeleteScrapeHistory(t *testing.T) { } validScrapeHistory := models.ScrapeHistory{ - ScrapeTaskID: "valid_task_id", + ScrapeTaskID: "000000000000valid_task_id", UserSourceID: validUSerSource.ID, } @@ -395,7 +395,7 @@ func TestDeleteScrapeHistory(t *testing.T) { id models.ScrapeTaskID wantErr bool }{ - {"Valid ID", "valid_task_id", false}, + {"Valid ID", "000000000000valid_task_id", false}, {"Empty ID", "", true}, {"Short ID", "short_id", true}, }