fix: finish progressive Target detection
This commit is contained in:
@@ -219,6 +219,24 @@ func TestDiagnosticServiceControlAuthorityUsesInjectedEUIDWithoutMutation(t *tes
|
||||
}
|
||||
}
|
||||
|
||||
func TestDetectClassifiesMalformedDaemonConfigurationAsFailure(t *testing.T) {
|
||||
a, _, daemonPath, _, _ := fixture(t)
|
||||
if err := os.MkdirAll(filepath.Dir(daemonPath), 0o700); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if err := os.WriteFile(daemonPath, []byte(`{"proxies":[]}`), 0o600); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
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 TestDiagnosticsAndEnableRejectMalformedDaemonProxyTypesWithoutMutation(t *testing.T) {
|
||||
for _, document := range []string{
|
||||
`[]`,
|
||||
|
||||
Reference in New Issue
Block a user