Fix nil Activity store in test setup causing panic on rebuild
build-and-push / test (push) Successful in 34s
build-and-push / build-and-push (push) Successful in 1m7s

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-13 23:32:50 -04:00
parent a6603b463f
commit 78a20770dd
+7 -4
View File
@@ -37,6 +37,7 @@ func newTestServer(t *testing.T) *httptest.Server {
ops := &store.Operations{DB: database}
locks := &store.Locks{DB: database, TTLMinutes: 60}
images := &store.Images{DB: database}
activity := &store.Activity{DB: database}
hub := events.NewHub()
t.Cleanup(func() { hub.Shutdown(context.Background()) })
@@ -55,10 +56,11 @@ func newTestServer(t *testing.T) *httptest.Server {
serverTypes := mustLoadServerTypes(t, tmp)
runner := &orchestrator.Runner{
Hosts: hosts,
Ops: ops,
Locks: locks,
Hub: hub,
Hosts: hosts,
Ops: ops,
Locks: locks,
Hub: hub,
Activity: activity,
}
pxeSupervisor := pxe.NewSupervisor(pxe.SupervisorConfig{Enabled: false})
@@ -101,6 +103,7 @@ func newTestServer(t *testing.T) *httptest.Server {
Ops: ops,
Locks: locks,
Images: images,
Activity: activity,
ImageSvc: imageSvc,
Runner: runner,
Orchestrator: hostOrch,