mirror of
https://github.com/hay-kot/homebox.git
synced 2025-06-28 22:58:36 +00:00
feat: add scheduled maintenance tasks (#320)
* add scheduled maintenance tasks * fix failing typecheck
This commit is contained in:
parent
70297b9d27
commit
025521431e
25 changed files with 521 additions and 121 deletions
|
@ -5,6 +5,7 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/hay-kot/homebox/backend/internal/data/types"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
@ -43,10 +44,10 @@ func TestMaintenanceEntryRepository_GetLog(t *testing.T) {
|
|||
}
|
||||
|
||||
created[i] = MaintenanceEntryCreate{
|
||||
Date: dt,
|
||||
Name: "Maintenance",
|
||||
Description: "Maintenance description",
|
||||
Cost: 10,
|
||||
CompletedDate: types.DateFromTime(dt),
|
||||
Name: "Maintenance",
|
||||
Description: "Maintenance description",
|
||||
Cost: 10,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -58,7 +59,9 @@ func TestMaintenanceEntryRepository_GetLog(t *testing.T) {
|
|||
}
|
||||
|
||||
// Get the log for the item
|
||||
log, err := tRepos.MaintEntry.GetLog(context.Background(), item.ID)
|
||||
log, err := tRepos.MaintEntry.GetLog(context.Background(), item.ID, MaintenanceLogQuery{
|
||||
Completed: true,
|
||||
})
|
||||
if err != nil {
|
||||
t.Fatalf("failed to get maintenance log: %v", err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue