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

Commit

Permalink
check-task: do not show successful pre-check items if fail(#712) (#730)
Browse files Browse the repository at this point in the history
  • Loading branch information
GMHDBJD authored Jun 11, 2020
1 parent 9b6c012 commit e1752be
Showing 1 changed file with 9 additions and 0 deletions.
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

0 comments on commit e1752be

Please sign in to comment.