From 17c45eea313fc78b3d1f8f3d977bb91b25f62eaa Mon Sep 17 00:00:00 2001 From: Christie Wilson Date: Fri, 13 Sep 2019 14:34:14 -0400 Subject: [PATCH] =?UTF-8?q?Remove=20unused=20function=20=F0=9F=91=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The function `GetLogMessages` isn't used anywhere. I had tried to remove it to see if it was causing the data race in #1124 - it _isnt_ but still it's not being used anywhere so why not remove :) --- test/controller.go | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/test/controller.go b/test/controller.go index e8b28d77f74..cf1aa374c63 100644 --- a/test/controller.go +++ b/test/controller.go @@ -35,22 +35,12 @@ import ( "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1alpha1" fakepipelineclientset "github.com/tektoncd/pipeline/pkg/client/clientset/versioned/fake" informersv1alpha1 "github.com/tektoncd/pipeline/pkg/client/informers/externalversions/pipeline/v1alpha1" - "go.uber.org/zap/zaptest/observer" corev1 "k8s.io/api/core/v1" coreinformers "k8s.io/client-go/informers/core/v1" fakekubeclientset "k8s.io/client-go/kubernetes/fake" "knative.dev/pkg/controller" ) -// GetLogMessages returns a list of all string logs in logs. -func GetLogMessages(logs *observer.ObservedLogs) []string { - messages := []string{} - for _, l := range logs.All() { - messages = append(messages, l.Message) - } - return messages -} - // Data represents the desired state of the system (i.e. existing resources) to seed controllers // with. type Data struct { @@ -86,7 +76,6 @@ type Informers struct { // TestAssets holds references to the controller, logs, clients, and informers. type TestAssets struct { Controller *controller.Impl - Logs *observer.ObservedLogs Clients Clients }