@@ -42,6 +42,8 @@ const (
4242 ResultPhaseCompleted ResultPhase = "Completed"
4343 // ResultPhaseStopped is phase of chaosresult which is in stopped state
4444 ResultPhaseStopped ResultPhase = "Stopped"
45+ // ResultPhaseError is phase of chaosresult, which indicates that the experiment is terminated due to an error
46+ ResultPhaseError ResultPhase = "Error"
4547)
4648
4749// ResultVerdict is typecasted to string for supporting the values below.
@@ -56,6 +58,8 @@ const (
5658 ResultVerdictStopped ResultVerdict = "Stopped"
5759 // ResultVerdictAwaited is verdict of chaosresult when experiment is yet to evaluated(experiment is in running state)
5860 ResultVerdictAwaited ResultVerdict = "Awaited"
61+ // ResultVerdictError is verdict of chaosresult when experiment is completed because of an error
62+ ResultVerdictError ResultVerdict = "Error"
5963)
6064
6165type ProbeVerdict string
@@ -118,18 +122,18 @@ type TestStatus struct {
118122 Phase ResultPhase `json:"phase"`
119123 // Verdict defines whether an experiment result is pass or fail
120124 Verdict ResultVerdict `json:"verdict"`
121- // FailureOutput defines failed step and errorCode, if experiment failed
122- FailureOutput * FailureOutput `json:"failureOutput ,omitempty"`
125+ // ErrorOutput defines error message and error code
126+ ErrorOutput * ErrorOutput `json:"errorOutput ,omitempty"`
123127 // ProbeSuccessPercentage defines the score of the probes
124128 ProbeSuccessPercentage string `json:"probeSuccessPercentage,omitempty"`
125129}
126130
127- // FailureOutput defines failed step and error code
128- type FailureOutput struct {
131+ // ErrorOutput defines error reason and error code
132+ type ErrorOutput struct {
129133 // ErrorCode defines error code of the experiment
130134 ErrorCode string `json:"errorCode,omitempty"`
131- // FailedStep defines step where the experiments failed
132- FailedStep string `json:"failedStep ,omitempty"`
135+ // Reason contains the error reason
136+ Reason string `json:"reason ,omitempty"`
133137}
134138
135139//+kubebuilder:object:root=true
0 commit comments