fix: finish progressive Target detection

This commit is contained in:
proxyctl coordinator
2026-07-17 21:25:43 +08:00
parent ad651402fd
commit 8348fa3ac8
17 changed files with 672 additions and 221 deletions
@@ -20,6 +20,19 @@ import (
"proxyctl/internal/target/targettest"
)
func TestDetectClassifiesMalformedClientConfigurationAsFailure(t *testing.T) {
a := newAdapter(t, nil)
writeConfig(t, a.ConfigPath(), `{"proxies":[]}`)
detection := a.Detect(context.Background(), activeProfile())
if detection.Err == nil || detection.Inspection.State != target.Disabled {
t.Fatalf("detection = %#v, want failed Disabled inspection", detection)
}
if got := a.Inspect(context.Background(), activeProfile()); got.State != target.Disabled {
t.Fatalf("maintenance inspection = %#v, want established Disabled semantics", got)
}
}
func TestAvailabilityAndDescriptionDescribeOnlyDockerClientDefaults(t *testing.T) {
a := newAdapter(t, nil)
availability := a.Availability(context.Background())