Add Scrape History #15

Merged
SoXX merged 8 commits from dev/scrape-history into main 2024-10-15 10:46:41 +00:00
Showing only changes of commit 0f1e6c6aaa - Show all commits

View File

@ -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},
}