Add depot, attendant, jetfire, optimus, ota services with kustomize overlays

This commit is contained in:
Chris Rai
2026-01-31 15:35:07 -05:00
parent a0ec642ca1
commit 9a5cb2f547
404 changed files with 38817 additions and 16 deletions

View File

@@ -0,0 +1,61 @@
package handlers
import (
"testing"
"github.com/fiskerinc/cloud-services/pkg/common"
)
func TestECUPrioritySwap(t *testing.T){
b := ManifestMigrateBody{
MigratedManifest: common.UpdateManifest{
ECUs: []*common.UpdateManifestECU{{
ID: 3,
InstallPriority: 1,
},
{
ID: 2,
InstallPriority: 2,
},
{
ID: 1,
InstallPriority: 3,
}},
},
}
swapECUInstallPriority(&b)
for _, ecu := range b.MigratedManifest.ECUs{
if ecu.ID != int64(ecu.InstallPriority){
t.Fail()
}
}
b = ManifestMigrateBody{
MigratedManifest: common.UpdateManifest{
ECUs: []*common.UpdateManifestECU{{
ID: 4,
InstallPriority: 1,
},
{
ID: 3,
InstallPriority: 2,
},
{
ID: 2,
InstallPriority: 3,
},
{
ID: 1,
InstallPriority: 4,
},
},
},
}
swapECUInstallPriority(&b)
for _, ecu := range b.MigratedManifest.ECUs{
if ecu.ID != int64(ecu.InstallPriority){
t.Fail()
}
}
}