Document standalone preflight and complete verification
This commit is contained in:
@@ -32,6 +32,9 @@ func TestPreflightCommandReportsNativeFormats(t *testing.T) {
|
||||
if format != "auto" {
|
||||
args = append(args, "--format", format)
|
||||
}
|
||||
if format == "json" {
|
||||
args = append(args, "--progress")
|
||||
}
|
||||
outcome := app.Execute(context.Background(), args, commandkit.Streams{Out: &out, Err: &diagnostics})
|
||||
if outcome.Status != 0 {
|
||||
t.Fatalf("outcome=%+v diagnostics=%s", outcome, diagnostics.String())
|
||||
@@ -45,6 +48,9 @@ func TestPreflightCommandReportsNativeFormats(t *testing.T) {
|
||||
if err != nil || report["ready"] != true || report["session_id"] != "2026-05-03" || report["checks"] == nil {
|
||||
t.Fatalf("report=%+v output=%s error=%v", report, out.String(), err)
|
||||
}
|
||||
if format == "json" && !strings.Contains(diagnostics.String(), "checking Audita readiness") {
|
||||
t.Fatalf("missing check progress on stderr: %s", diagnostics.String())
|
||||
}
|
||||
})
|
||||
}
|
||||
provider.PreflightErr = errors.New("synthetic provider failure")
|
||||
|
||||
Reference in New Issue
Block a user