Skip to content

Commit f3873a0

Browse files
authored
Adding failstep and error code changes to master (#440)
* feat(errorCode): Adding error code inside chaosresult (#436) Signed-off-by: Shubham Chaudhary <shubham.chaudhary@harness.io>
1 parent d39bc1f commit f3873a0

File tree

2 files changed

+31
-3
lines changed

2 files changed

+31
-3
lines changed

api/litmuschaos/v1alpha1/chaosresult_types.go

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,20 @@ type TestStatus struct {
118118
Phase ResultPhase `json:"phase"`
119119
// Verdict defines whether an experiment result is pass or fail
120120
Verdict ResultVerdict `json:"verdict"`
121-
// FailStep defines step where the experiments fails
122-
FailStep string `json:"failStep,omitempty"`
121+
// FailureOutput defines failed step and errorCode, if experiment failed
122+
FailureOutput *FailureOutput `json:"failureOutput,omitempty"`
123123
// ProbeSuccessPercentage defines the score of the probes
124124
ProbeSuccessPercentage string `json:"probeSuccessPercentage,omitempty"`
125125
}
126126

127+
// FailureOutput defines failed step and error code
128+
type FailureOutput struct {
129+
// ErrorCode defines error code of the experiment
130+
ErrorCode string `json:"errorCode,omitempty"`
131+
// FailedStep defines step where the experiments failed
132+
FailedStep string `json:"failedStep,omitempty"`
133+
}
134+
127135
//+kubebuilder:object:root=true
128136
//+kubebuilder:subresource:status
129137
// +genclient

api/litmuschaos/v1alpha1/zz_generated.deepcopy.go

Lines changed: 21 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)