fix: finish progressive Target detection
This commit is contained in:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user