Skip to content

Commit

Permalink
Fixed result history resetting to 0 on rerun (#47)
Browse files Browse the repository at this point in the history
Signed-off-by: Vivek Kumar <[email protected]>
Co-authored-by: Vivek Kumar <[email protected]>
  • Loading branch information
vivekkumar-git and Vivek Kumar authored May 16, 2023
1 parent 32aab16 commit bb1147e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions pkg/result/chaosresult.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,20 +81,20 @@ def InitializeChaosResult(self, chaosDetails , resultDetails , experimentLabel,
#PatchChaosResult Update the chaos result
def PatchChaosResult(self, clients, result, chaosDetails, resultDetails, chaosResultLabel):

passedRuns = 0
failedRuns = 0
stoppedRuns = 0
passedRuns = result.status.history.passedRuns
failedRuns = result.status.history.failedRuns
stoppedRuns = result.status.history.stoppedRuns

#isAllProbePassed, probeStatus = self.GetProbeStatus(resultDetails)
if str(resultDetails.Phase).lower() == "completed":

if str(resultDetails.Verdict).lower() == "pass":
probeSuccessPercentage = "100"
passedRuns = result.status.history.passedRuns + 1
passedRuns += 1
elif str(resultDetails.Verdict).lower() == "fail":
failedRuns = result.status.history.failedRuns + 1
failedRuns += 1
probeSuccessPercentage = "0"
elif str(resultDetails.Verdict).lower() == "stopped":
stoppedRuns = result.status.history.stoppedRuns + 1
stoppedRuns += 1
probeSuccessPercentage = "0"
else:
probeSuccessPercentage = "Awaited"
Expand Down

0 comments on commit bb1147e

Please sign in to comment.