mirror of
https://github.com/kubevela/kubevela.git
synced 2026-08-19 04:26:39 +00:00
add const CondStatusTrue
This commit is contained in:
@@ -123,6 +123,9 @@ const (
|
||||
CondReasonStopped = "Stopped"
|
||||
// CondReasonFailed is the reason of the workflow progress condition which is failed
|
||||
CondReasonFailed = "Failed"
|
||||
|
||||
// CondStatusTrue is the status of the workflow progress condition which is True
|
||||
CondStatusTrue = "True"
|
||||
)
|
||||
|
||||
func (w *workflow) syncWorkflowStatus(step oamcore.WorkflowStep, obj *unstructured.Unstructured) (*common.WorkflowStepStatus, error) {
|
||||
@@ -142,7 +145,7 @@ func (w *workflow) syncWorkflowStatus(step oamcore.WorkflowStep, obj *unstructur
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if !found || cond.Status != "True" {
|
||||
if !found || cond.Status != CondStatusTrue {
|
||||
status.Phase = common.WorkflowStepPhaseRunning
|
||||
return status, nil
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ func TestExecuteSteps(t *testing.T) {
|
||||
"type": CondTypeWorkflowFinish,
|
||||
"reason": CondReasonSucceeded,
|
||||
"message": string(succeededMessage),
|
||||
"status": "True",
|
||||
"status": CondStatusTrue,
|
||||
}},
|
||||
},
|
||||
},
|
||||
@@ -84,7 +84,7 @@ func TestExecuteSteps(t *testing.T) {
|
||||
"type": CondTypeWorkflowFinish,
|
||||
"reason": CondReasonSucceeded,
|
||||
"message": string(succeededMessage),
|
||||
"status": "True",
|
||||
"status": CondStatusTrue,
|
||||
}},
|
||||
},
|
||||
},
|
||||
@@ -95,7 +95,7 @@ func TestExecuteSteps(t *testing.T) {
|
||||
"status": map[string]interface{}{
|
||||
"conditions": []interface{}{map[string]interface{}{
|
||||
"type": CondTypeWorkflowFinish,
|
||||
"status": "True",
|
||||
"status": CondStatusTrue,
|
||||
}},
|
||||
},
|
||||
},
|
||||
@@ -106,7 +106,7 @@ func TestExecuteSteps(t *testing.T) {
|
||||
"conditions": []interface{}{map[string]interface{}{
|
||||
"type": CondTypeWorkflowFinish,
|
||||
"reason": CondReasonStopped,
|
||||
"status": "True",
|
||||
"status": CondStatusTrue,
|
||||
}},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user