//go:build linux package host import ( "github.com/carlosframework/platform/internal/hostactors" "testing" ) func TestActivationConsoleProcessIdentity(t *testing.T) { r := hostactors.Report{ProcessID: "boot:4026531836:123:456", BootID: "boot"} if pid, start, err := activationConsolePID(r); err != nil || pid != 123 || start != "456" { t.Fatal(pid, start, err) } for _, id := range []string{"boot:123", "boot:4026531836:0:456", "other:4026531836:123:456", "boot:4026531836:123:0", "boot:bad:123:456"} { r.ProcessID = id if _, _, err := activationConsolePID(r); err == nil { t.Fatal("accepted", id) } } }