diff --git a/pkg/reconciler/pipelinerun/resources/pipelinerunresolution_test.go b/pkg/reconciler/pipelinerun/resources/pipelinerunresolution_test.go index 41c7992db6d..33db48269ca 100644 --- a/pkg/reconciler/pipelinerun/resources/pipelinerunresolution_test.go +++ b/pkg/reconciler/pipelinerun/resources/pipelinerunresolution_test.go @@ -1252,7 +1252,9 @@ func TestResolvedPipelineRun_PipelineTaskHasOptionalResources(t *testing.T) { }, } - getTask := func(ctx context.Context, name string) (v1beta1.TaskInterface, error) { return taskWithOptionalResourcesDeprecated, nil } + getTask := func(ctx context.Context, name string) (v1beta1.TaskInterface, error) { + return taskWithOptionalResourcesDeprecated, nil + } getTaskRun := func(name string) (*v1beta1.TaskRun, error) { return nil, nil } getClusterTask := func(name string) (v1beta1.TaskInterface, error) { return nil, nil } getCondition := func(name string) (*v1alpha1.Condition, error) { return nil, nil } diff --git a/pkg/reconciler/pipelinerun/resources/pipelinespec_test.go b/pkg/reconciler/pipelinerun/resources/pipelinespec_test.go index 0aa50ba5c93..4e5413dd751 100644 --- a/pkg/reconciler/pipelinerun/resources/pipelinespec_test.go +++ b/pkg/reconciler/pipelinerun/resources/pipelinespec_test.go @@ -81,7 +81,9 @@ func TestGetPipelineSpec_Embedded(t *testing.T) { }, }, } - gt := func(ctx context.Context, n string) (v1beta1.PipelineInterface, error) { return nil, errors.New("shouldn't be called") } + gt := func(ctx context.Context, n string) (v1beta1.PipelineInterface, error) { + return nil, errors.New("shouldn't be called") + } pipelineMeta, pipelineSpec, err := GetPipelineData(context.Background(), pr, gt) if err != nil { @@ -103,7 +105,9 @@ func TestGetPipelineSpec_Invalid(t *testing.T) { Name: "mypipelinerun", }, } - gt := func(ctx context.Context, n string) (v1beta1.PipelineInterface, error) { return nil, errors.New("shouldn't be called") } + gt := func(ctx context.Context, n string) (v1beta1.PipelineInterface, error) { + return nil, errors.New("shouldn't be called") + } _, _, err := GetPipelineData(context.Background(), tr, gt) if err == nil { t.Fatalf("Expected error resolving spec with no embedded or referenced pipeline spec but didn't get error") @@ -121,7 +125,9 @@ func TestGetPipelineSpec_Error(t *testing.T) { }, }, } - gt := func(ctx context.Context, n string) (v1beta1.PipelineInterface, error) { return nil, errors.New("something went wrong") } + gt := func(ctx context.Context, n string) (v1beta1.PipelineInterface, error) { + return nil, errors.New("something went wrong") + } _, _, err := GetPipelineData(context.Background(), tr, gt) if err == nil { t.Fatalf("Expected error when unable to find referenced Pipeline but got none") diff --git a/pkg/reconciler/taskrun/resources/taskspec_test.go b/pkg/reconciler/taskrun/resources/taskspec_test.go index 803513d7b33..6dd77db1083 100644 --- a/pkg/reconciler/taskrun/resources/taskspec_test.go +++ b/pkg/reconciler/taskrun/resources/taskspec_test.go @@ -76,7 +76,9 @@ func TestGetTaskSpec_Embedded(t *testing.T) { }, }, } - gt := func(ctx context.Context, n string) (v1beta1.TaskInterface, error) { return nil, errors.New("shouldn't be called") } + gt := func(ctx context.Context, n string) (v1beta1.TaskInterface, error) { + return nil, errors.New("shouldn't be called") + } taskMeta, taskSpec, err := GetTaskData(context.Background(), tr, gt) if err != nil { @@ -98,7 +100,9 @@ func TestGetTaskSpec_Invalid(t *testing.T) { Name: "mytaskrun", }, } - gt := func(ctx context.Context, n string) (v1beta1.TaskInterface, error) { return nil, errors.New("shouldn't be called") } + gt := func(ctx context.Context, n string) (v1beta1.TaskInterface, error) { + return nil, errors.New("shouldn't be called") + } _, _, err := GetTaskData(context.Background(), tr, gt) if err == nil { t.Fatalf("Expected error resolving spec with no embedded or referenced task spec but didn't get error") @@ -116,7 +120,9 @@ func TestGetTaskSpec_Error(t *testing.T) { }, }, } - gt := func(ctx context.Context, n string) (v1beta1.TaskInterface, error) { return nil, errors.New("something went wrong") } + gt := func(ctx context.Context, n string) (v1beta1.TaskInterface, error) { + return nil, errors.New("something went wrong") + } _, _, err := GetTaskData(context.Background(), tr, gt) if err == nil { t.Fatalf("Expected error when unable to find referenced Task but got none")