From c2c1c22e937f448e39c46c2acf1979cd471bc2e5 Mon Sep 17 00:00:00 2001 From: Eric Zhang Date: Mon, 22 Apr 2024 15:48:08 -0400 Subject: [PATCH] chore: format --- cmd/sidecarlogartifacts/main.go | 5 +++-- internal/sidecarlogartifacts/sidecarlogartifacts_test.go | 7 ++++--- pkg/pod/pod.go | 1 - pkg/pod/status.go | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/cmd/sidecarlogartifacts/main.go b/cmd/sidecarlogartifacts/main.go index df49cf574e2..51158454aaa 100644 --- a/cmd/sidecarlogartifacts/main.go +++ b/cmd/sidecarlogartifacts/main.go @@ -16,11 +16,12 @@ package main import ( "encoding/json" "flag" - "github.com/tektoncd/pipeline/internal/sidecarlogartifacts" - "github.com/tektoncd/pipeline/pkg/pod" "log" "os" "strings" + + "github.com/tektoncd/pipeline/internal/sidecarlogartifacts" + "github.com/tektoncd/pipeline/pkg/pod" ) func main() { diff --git a/internal/sidecarlogartifacts/sidecarlogartifacts_test.go b/internal/sidecarlogartifacts/sidecarlogartifacts_test.go index 6a9f01dcad6..345c5b5f6a2 100644 --- a/internal/sidecarlogartifacts/sidecarlogartifacts_test.go +++ b/internal/sidecarlogartifacts/sidecarlogartifacts_test.go @@ -19,15 +19,16 @@ package sidecarlogartifacts import ( "context" "encoding/json" + "os" + "path/filepath" + "testing" + "github.com/google/go-cmp/cmp" v1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1" "github.com/tektoncd/pipeline/test/diff" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" fakekubeclientset "k8s.io/client-go/kubernetes/fake" - "os" - "path/filepath" - "testing" ) func TestLookForArtifacts_WaitForFiles(t *testing.T) { diff --git a/pkg/pod/pod.go b/pkg/pod/pod.go index 2e649da54b6..79e02cd2d7a 100644 --- a/pkg/pod/pod.go +++ b/pkg/pod/pod.go @@ -776,7 +776,6 @@ func usesWindows(tr *v1.TaskRun) bool { // that will allow it to run in namespaces with "restricted" pod security admission. // It will also provide arguments to the binary that allow it to surface the step artifacts. func createArtifactsSidecar(taskSpec v1.TaskSpec, image string, setSecurityContext, windows bool) (v1.Sidecar, error) { - var stepNames []string for i, s := range taskSpec.Steps { diff --git a/pkg/pod/status.go b/pkg/pod/status.go index bfc3850e12f..d99216f0d1d 100644 --- a/pkg/pod/status.go +++ b/pkg/pod/status.go @@ -20,12 +20,12 @@ import ( "context" "encoding/json" "fmt" - "github.com/tektoncd/pipeline/internal/sidecarlogartifacts" "strconv" "strings" "time" "github.com/hashicorp/go-multierror" + "github.com/tektoncd/pipeline/internal/sidecarlogartifacts" "github.com/tektoncd/pipeline/internal/sidecarlogresults" "github.com/tektoncd/pipeline/pkg/apis/config" "github.com/tektoncd/pipeline/pkg/apis/pipeline"