test: verify Operations Console process output
This commit is contained in:
@@ -242,9 +242,26 @@ func TestCommandsRunAsRealProcessesInsideIsolatedUserState(t *testing.T) {
|
||||
}
|
||||
|
||||
defaultOutput, err := invoke("q")
|
||||
if err != nil || !strings.Contains(string(defaultOutput), "proxyctl — Target panel") {
|
||||
if err != nil {
|
||||
t.Fatalf("default process err=%v output=%q", err, defaultOutput)
|
||||
}
|
||||
defaultView := string(defaultOutput)
|
||||
for _, expected := range []string{
|
||||
"proxyctl Operations Console",
|
||||
"Active Profile: No Active Profile",
|
||||
"Targets: ● Enabled 0 ○ Disabled 1 ◇ External 0 ! Drifted 1",
|
||||
"▶ Targets [focused]",
|
||||
"> ○ Disabled Shell",
|
||||
"! Drifted Docker daemon",
|
||||
"Target details",
|
||||
"State: ○ Disabled",
|
||||
"Evidence: no recognized Shell proxy configuration detected",
|
||||
"Tab: focus details",
|
||||
} {
|
||||
if !strings.Contains(defaultView, expected) {
|
||||
t.Errorf("default Operations Console missing %q; output=%q", expected, defaultOutput)
|
||||
}
|
||||
}
|
||||
versionOutput, err := invoke("", "version", "--short")
|
||||
if err != nil || strings.TrimSpace(string(versionOutput)) == "" || strings.Contains(string(versionOutput), " ") {
|
||||
t.Fatalf("version process err=%v output=%q", err, versionOutput)
|
||||
|
||||
Reference in New Issue
Block a user