Skip to content

Commit

Permalink
fix: tune parallel step detection
Browse files Browse the repository at this point in the history
Signed-off-by: Vladislav Sukhin <[email protected]>
  • Loading branch information
vsukhin committed Dec 2, 2024
1 parent c71fb91 commit 6003cde
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions pkg/api/v1/testkube/model_test_workflow_signature_extended.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,18 @@ func (s *TestWorkflowSignature) Sequence() []TestWorkflowSignature {
}

func (s *TestWorkflowSignature) GetParallelStepReference(nameOrReference string) string {
if s.Category == "Run in parallel" {
if nameOrReference == "" {
return s.Ref
}

if s.Name == nameOrReference || s.Ref == nameOrReference {
return s.Ref
}
if s.Category == "Run in parallel" && (nameOrReference == "" || s.Ref == nameOrReference) {
return s.Ref
}

for _, child := range s.Children {
if s.Name == nameOrReference {
ref := child.GetParallelStepReference("")
if ref != "" {
return ref
}
}

ref := child.GetParallelStepReference(nameOrReference)
if ref != "" {
return ref
Expand Down

0 comments on commit 6003cde

Please sign in to comment.