Skip to content

Commit

Permalink
fix: nil check
Browse files Browse the repository at this point in the history
Signed-off-by: Vladislav Sukhin <[email protected]>
  • Loading branch information
vsukhin committed Aug 5, 2024
1 parent aeb7ce6 commit 922469d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 3 additions & 0 deletions pkg/api/v1/testkube/model_test_workflow_extended.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ func (w *TestWorkflow) ConvertDots(fn func(string) string) *TestWorkflow {
if w.Labels == nil {
w.Labels = convertDotsInMap(w.Labels, fn)
}
if w.Spec == nil {
return w
}
if w.Spec.Pod != nil {
w.Spec.Pod.Labels = convertDotsInMap(w.Spec.Pod.Labels, fn)
w.Spec.Pod.Annotations = convertDotsInMap(w.Spec.Pod.Annotations, fn)
Expand Down
3 changes: 0 additions & 3 deletions pkg/repository/testworkflow/mongo_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ func TestNewMongoRepository_UpdateReport_Integration(t *testing.T) {
Workflow: &testkube.TestWorkflow{
Name: "test-name",
},
ResolvedWorkflow: &testkube.TestWorkflow{
Name: "test-name",
},
}
if err := repo.Insert(ctx, &execution); err != nil {
t.Fatalf("error inserting execution: %v", err)
Expand Down

0 comments on commit 922469d

Please sign in to comment.