Skip to content

Commit

Permalink
feat: unit tests for cd events mapper test workflows
Browse files Browse the repository at this point in the history
Signed-off-by: Vladislav Sukhin <vladislav@kubeshop.io>
  • Loading branch information
vsukhin committed Jul 3, 2024
1 parent c02c3d3 commit 90965ce
Show file tree
Hide file tree
Showing 2 changed files with 502 additions and 4 deletions.
6 changes: 3 additions & 3 deletions pkg/mapper/cdevents/mapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ func MapTestkubeEventStartTestWorkflowTestToCDEvent(event testkube.Event, cluste

ev.SetSubjectSource(clusterID)
ev.SetSource(clusterID)
if event.TestExecution != nil {
if event.TestWorkflowExecution != nil {
workflowName := ""
if event.TestWorkflowExecution.Workflow != nil {
workflowName = event.TestWorkflowExecution.Workflow.Name
Expand Down Expand Up @@ -653,8 +653,8 @@ func MapTestkubeEventFinishTestWorkflowTestToCDEvent(event testkube.Event, clust
return nil, err
}

if event.TestExecution != nil {
ev.SetSubjectId(event.TestExecution.Id)
if event.TestWorkflowExecution != nil {
ev.SetSubjectId(event.TestWorkflowExecution.Id)
}

ev.SetSubjectSource(clusterID)
Expand Down
Loading

0 comments on commit 90965ce

Please sign in to comment.