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}
|
||||
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,
|
||||
|
||||
Reference in New Issue
Block a user