Skip to content

Commit

Permalink
chore: run make goimports
Browse files Browse the repository at this point in the history
  • Loading branch information
eddie4941 authored and tekton-robot committed Oct 6, 2020
1 parent b9a21a6 commit 1710b68
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
12 changes: 9 additions & 3 deletions pkg/reconciler/pipelinerun/resources/pipelinespec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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")
Expand All @@ -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")
Expand Down
12 changes: 9 additions & 3 deletions pkg/reconciler/taskrun/resources/taskspec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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")
Expand All @@ -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")
Expand Down

0 comments on commit 1710b68

Please sign in to comment.