mirror of
https://github.com/browseros-ai/BrowserOS.git
synced 2026-05-20 04:21:23 +00:00
* feat(openclaw): add gateway image inspection * feat(openclaw): pull gateway image from registry * refactor(vm): decouple readiness from image cache * refactor(openclaw): remove vm cache from runtime factory * feat(openclaw): detect current gateway image * feat(openclaw): prewarm vm runtime and reuse current gateway * feat(openclaw): prewarm runtime on server startup * refactor(vm): remove browseros image cache runtime * refactor(build-tools): remove openclaw tarball pipeline * chore: self-review fixes * fix(openclaw): suppress prewarm pull progress logs * fix(openclaw): address review feedback * fix(openclaw): resolve review findings * fix(dev): stop stale watch supervisors
33 lines
782 B
Go
33 lines
782 B
Go
package proc
|
|
|
|
import "testing"
|
|
|
|
func TestWatchProcessGroupsFromPSSelectsOtherWatchGroups(t *testing.T) {
|
|
output := `
|
|
111 111 /tmp/one/browseros-dev watch
|
|
222 222 /tmp/two/browseros-dev watch --new
|
|
333 333 /tmp/one/browseros-dev cleanup
|
|
444 444 rg browseros-dev watch
|
|
555 555 bun run dev:watch
|
|
`
|
|
|
|
groups := watchProcessGroupsFromPS(output, 999)
|
|
|
|
if len(groups) != 1 || groups[0] != 111 {
|
|
t.Fatalf("expected only pgid 111, got %#v", groups)
|
|
}
|
|
}
|
|
|
|
func TestWatchProcessGroupsFromPSDedupesProcessGroups(t *testing.T) {
|
|
output := `
|
|
111 111 /tmp/one/browseros-dev watch
|
|
112 111 /tmp/one/browseros-dev watch
|
|
`
|
|
|
|
groups := watchProcessGroupsFromPS(output, 999)
|
|
|
|
if len(groups) != 1 || groups[0] != 111 {
|
|
t.Fatalf("expected one pgid 111, got %#v", groups)
|
|
}
|
|
}
|