carlos / platform Public

Clone
git clone https://amadan.net/carlos/platform

Plain git — no account needed to clone.

Download

Download this file

1//go:build linux && rootrunner
2
3package host
4
5import (
6 "github.com/carlosframework/platform/internal/hostbox"
7 "testing"
8)
9
10func openRebootInventory(t *testing.T, path string) (*hostbox.StopInventoryDB, error) {
11 j, err := hostbox.OpenLaunchJournal(path)
12 if err != nil {
13 return nil, err
14 }
15 s, err := hostbox.NewJournalService(j)
16 if err != nil {
17 j.Close()
18 return nil, err
19 }
20 t.Cleanup(func() { j.Close() })
21 return s.Inventory, nil
22}
23