Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

check-task: do not show successful pre-check items if fail(#712) #730

Merged
merged 2 commits into from
Jun 11, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions checker/checker.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,15 @@ func (c *Checker) Process(ctx context.Context, pr chan pb.ProcessResult) {
errs = append(errs, unit.NewProcessError(pb.ErrorType_CheckFailed, err))
} else if !result.Summary.Passed {
errs = append(errs, unit.NewProcessError(pb.ErrorType_CheckFailed, errors.New("check was failed, please see detail")))

// remove success result if not pass
results := result.Results[:0]
for _, r := range result.Results {
if r.State != check.StateSuccess {
results = append(results, r)
}
}
result.Results = results
}

c.updateInstruction(result)
Expand Down