package hostbox import ( "github.com/carlosframework/platform/internal/hostguard" "reflect" "testing" ) func TestPlan11Fix1StopProjectionIncludesUnitIDs(t *testing.T) { target := hostguard.FenceTarget{Host: "shop.example", Incarnation: "inc", Stamp: 1, Session: 1, Box: "box", Enrollment: "enroll", BootID: "boot", ControllerID: "controller"} in := LaunchInventory{Target: target, NoState: true, WritersClosed: true, Reservations: []LaunchReservation{{ID: "first", State: UnitSettled, Group: LaunchGroup{RelativePath: "carlos.slice/carlos-habc.slice/carlos-run@shop.example.service"}}}} before, err := launchStopKernelJournal(in, target) if err != nil { t.Fatal(err) } in.Reservations = append(in.Reservations, LaunchReservation{ID: "second", State: UnitSettled, Group: LaunchGroup{RelativePath: "carlos.slice/carlos-habc.slice/carlos-run@shop.example.service"}}) after, err := launchStopKernelJournal(in, target) if err != nil { t.Fatal(err) } if reflect.DeepEqual(before, after) { t.Fatal("new settled unit reservation invisible in scan projection") } }