Skip to content

Commit

Permalink
fix test to assert at least one process has data
Browse files Browse the repository at this point in the history
  • Loading branch information
wiyu committed Jun 23, 2024
1 parent 54023f6 commit 064daac
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/new-e2e/tests/process/testing.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,9 +259,14 @@ func assertManualProcessCheck(t *testing.T, check string, withIOStats bool, proc
procs := filterProcess(process, checkOutput.Processes)
assert.NotEmpty(t, procs, "no processes found")

var hasData bool
for _, proc := range procs {
assert.Truef(t, processHasData(proc), "%s process is missing data", proc)
if processHasData(proc) {
hasData = true
break
}
}
assert.Truef(t, hasData, "Missing process data: %v", procs)

if withIOStats {
var hasIOStats bool
Expand Down

0 comments on commit 064daac

Please sign in to comment.