From f7b7a1413e278742caaa7bf93b198ed1dc963888 Mon Sep 17 00:00:00 2001 From: Scott Date: Wed, 25 Mar 2020 09:18:13 -0400 Subject: [PATCH] Appease lint: else with nested if replaced with else-if --- pkg/reconciler/pipelinerun/pipelinerun_test.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/pkg/reconciler/pipelinerun/pipelinerun_test.go b/pkg/reconciler/pipelinerun/pipelinerun_test.go index 5e9b1eebbe1..83f694802fe 100644 --- a/pkg/reconciler/pipelinerun/pipelinerun_test.go +++ b/pkg/reconciler/pipelinerun/pipelinerun_test.go @@ -942,11 +942,8 @@ func TestReconcileWithTimeout(t *testing.T) { actual := clients.Pipeline.Actions()[0].(ktesting.CreateAction).GetObject().(*v1alpha1.TaskRun) if actual == nil { t.Errorf("Expected a TaskRun to be created, but it wasn't.") - } else { - // The TaskRun timeout should be less than or equal to the PipelineRun timeout. - if actual.Spec.Timeout.Duration > prs[0].Spec.Timeout.Duration { - t.Errorf("TaskRun timeout %s should be less than or equal to PipelineRun timeout %s", actual.Spec.Timeout.Duration.String(), prs[0].Spec.Timeout.Duration.String()) - } + } else if actual.Spec.Timeout.Duration > prs[0].Spec.Timeout.Duration { + t.Errorf("TaskRun timeout %s should be less than or equal to PipelineRun timeout %s", actual.Spec.Timeout.Duration.String(), prs[0].Spec.Timeout.Duration.String()) } }