Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -349,10 +349,8 @@ func validateUpsertWorkflowInput(input OffchainWorkflowInput) error {
if input.Status == "" {
return fmt.Errorf("status is required")
}
if input.Status != WorkflowStatusUnspecified &&
input.Status != WorkflowStatusActive &&
input.Status != WorkflowStatusPaused {
return fmt.Errorf("status must be one of %q, %q, %q", WorkflowStatusUnspecified, WorkflowStatusActive, WorkflowStatusPaused)
if input.Status != WorkflowStatusActive && input.Status != WorkflowStatusPaused {
return fmt.Errorf("status must be one of %q, %q", WorkflowStatusActive, WorkflowStatusPaused)
}
if input.WorkflowName == "" {
return fmt.Errorf("workflowName is required")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func TestValidateUpsertWorkflowInput(t *testing.T) {
{
name: "invalid status",
input: OffchainWorkflowInput{WorkflowID: "wf", Status: "INVALID", WorkflowName: "w", BinaryURL: "b", DonFamily: "f"},
err: "status must be one of \"WORKFLOW_STATUS_UNSPECIFIED\", \"WORKFLOW_STATUS_ACTIVE\", \"WORKFLOW_STATUS_PAUSED\"",
err: "status must be one of \"WORKFLOW_STATUS_ACTIVE\", \"WORKFLOW_STATUS_PAUSED\"",
},
{
name: "workflowName exceeds max length",
Expand Down
Loading