[WIP] Simplify update system

This commit is contained in:
Daniel
2024-10-31 16:38:12 +01:00
parent d6669ff8f5
commit 0f3f3c360f
29 changed files with 1101 additions and 891 deletions

View File

@@ -23,11 +23,11 @@ type testInstance struct {
db *dbmodule.DBModule
api *api.API
config *config.Config
updates *updates.Updates
updates *updates.Updater
geoip *geoip.GeoIP
}
func (stub *testInstance) IntelUpdates() *updates.Updates {
func (stub *testInstance) IntelUpdates() *updates.Updater {
return stub.updates
}
@@ -84,7 +84,7 @@ func runTest(m *testing.M) error {
if err != nil {
return fmt.Errorf("failed to create api: %w", err)
}
stub.updates, err = updates.New(stub, "Test Intel", updates.UpdateIndex{
stub.updates, err = updates.New(stub, "Test Intel", updates.Config{
Directory: installDir,
IndexFile: "index.json",
})