Fix nil Activity store in test setup causing panic on rebuild
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -37,6 +37,7 @@ func newTestServer(t *testing.T) *httptest.Server {
|
|||||||
ops := &store.Operations{DB: database}
|
ops := &store.Operations{DB: database}
|
||||||
locks := &store.Locks{DB: database, TTLMinutes: 60}
|
locks := &store.Locks{DB: database, TTLMinutes: 60}
|
||||||
images := &store.Images{DB: database}
|
images := &store.Images{DB: database}
|
||||||
|
activity := &store.Activity{DB: database}
|
||||||
hub := events.NewHub()
|
hub := events.NewHub()
|
||||||
t.Cleanup(func() { hub.Shutdown(context.Background()) })
|
t.Cleanup(func() { hub.Shutdown(context.Background()) })
|
||||||
|
|
||||||
@@ -55,10 +56,11 @@ func newTestServer(t *testing.T) *httptest.Server {
|
|||||||
serverTypes := mustLoadServerTypes(t, tmp)
|
serverTypes := mustLoadServerTypes(t, tmp)
|
||||||
|
|
||||||
runner := &orchestrator.Runner{
|
runner := &orchestrator.Runner{
|
||||||
Hosts: hosts,
|
Hosts: hosts,
|
||||||
Ops: ops,
|
Ops: ops,
|
||||||
Locks: locks,
|
Locks: locks,
|
||||||
Hub: hub,
|
Hub: hub,
|
||||||
|
Activity: activity,
|
||||||
}
|
}
|
||||||
|
|
||||||
pxeSupervisor := pxe.NewSupervisor(pxe.SupervisorConfig{Enabled: false})
|
pxeSupervisor := pxe.NewSupervisor(pxe.SupervisorConfig{Enabled: false})
|
||||||
@@ -101,6 +103,7 @@ func newTestServer(t *testing.T) *httptest.Server {
|
|||||||
Ops: ops,
|
Ops: ops,
|
||||||
Locks: locks,
|
Locks: locks,
|
||||||
Images: images,
|
Images: images,
|
||||||
|
Activity: activity,
|
||||||
ImageSvc: imageSvc,
|
ImageSvc: imageSvc,
|
||||||
Runner: runner,
|
Runner: runner,
|
||||||
Orchestrator: hostOrch,
|
Orchestrator: hostOrch,
|
||||||
|
|||||||
Reference in New Issue
Block a user