Show progress for each preflight profile
This commit is contained in:
@@ -61,7 +61,7 @@ func classifyStructuredOutput(report *pk.SmokeTestReport, err error) Verificatio
|
||||
}
|
||||
|
||||
// VerifyStructuredOutput checks selected profiles sequentially and retains native evidence.
|
||||
func VerifyStructuredOutput(ctx context.Context, engine smokeTester, profiles []string) ([]ProfileVerification, error) {
|
||||
func VerifyStructuredOutput(ctx context.Context, engine smokeTester, profiles []string, progress func(string)) ([]ProfileVerification, error) {
|
||||
var results []ProfileVerification
|
||||
var failures []error
|
||||
for _, id := range profiles {
|
||||
@@ -69,6 +69,9 @@ func VerifyStructuredOutput(ctx context.Context, engine smokeTester, profiles []
|
||||
failures = append(failures, err)
|
||||
break
|
||||
}
|
||||
if progress != nil {
|
||||
progress(id)
|
||||
}
|
||||
report, err := engine.SmokeTest(ctx, pk.SmokeTestRequest{Kind: pk.SmokeTestStructuredOutput, ProfileID: id})
|
||||
status := classifyStructuredOutput(report, err)
|
||||
results = append(results, ProfileVerification{ProfileID: id, Status: status, Report: report, Err: err})
|
||||
|
||||
Reference in New Issue
Block a user