Improve updatemgr and updates module

This commit is contained in:
Daniel
2025-01-21 09:19:18 +01:00
parent 49e1fc8c31
commit aa1bd0679c
11 changed files with 589 additions and 139 deletions

View File

@@ -84,7 +84,7 @@ func TestPerformUpdate(t *testing.T) {
}
if data, err := os.ReadFile(filepath.Join(updateDir, "index.json")); err == nil {
fmt.Println(string(data))
idx, err := ParseIndex(data, nil)
idx, err := ParseIndex(data, updater.cfg.Platform, nil)
if err == nil {
fmt.Println(idx.Version)
fmt.Println(idx.versionNum)
@@ -97,7 +97,7 @@ func TestPerformUpdate(t *testing.T) {
})
// Check if the current version is now the new.
newIndex, err := LoadIndex(filepath.Join(installedDir, "index.json"), nil)
newIndex, err := LoadIndex(filepath.Join(installedDir, "index.json"), updater.cfg.Platform, nil)
if err != nil {
t.Fatal(err)
}