From 77d96f73c37fad61e5ba0d382d0ab8f98cdf6dc4 Mon Sep 17 00:00:00 2001 From: Andrew Bayer Date: Wed, 7 Sep 2022 13:26:32 -0400 Subject: [PATCH] Switch remaining clock references to k8s.io/utils/clock These references were added after #5413 was opened. Signed-off-by: Andrew Bayer --- pkg/apis/pipeline/v1/pipelinerun_types.go | 2 +- pkg/resolution/resolver/framework/testing/fakecontroller.go | 4 ++-- test/custom-task-ctrls/wait-task/cmd/controller/main.go | 2 +- test/custom-task-ctrls/wait-task/go.mod | 1 + test/custom-task-ctrls/wait-task/pkg/reconciler/reconciler.go | 2 +- .../wait-task/pkg/reconciler/reconciler_test.go | 2 +- 6 files changed, 7 insertions(+), 6 deletions(-) diff --git a/pkg/apis/pipeline/v1/pipelinerun_types.go b/pkg/apis/pipeline/v1/pipelinerun_types.go index dc3cbf1b068..dee56cb2c5d 100644 --- a/pkg/apis/pipeline/v1/pipelinerun_types.go +++ b/pkg/apis/pipeline/v1/pipelinerun_types.go @@ -31,7 +31,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/util/clock" + "k8s.io/utils/clock" "knative.dev/pkg/apis" duckv1beta1 "knative.dev/pkg/apis/duck/v1beta1" ) diff --git a/pkg/resolution/resolver/framework/testing/fakecontroller.go b/pkg/resolution/resolver/framework/testing/fakecontroller.go index d1552547f4a..12aea9e2ebb 100644 --- a/pkg/resolution/resolver/framework/testing/fakecontroller.go +++ b/pkg/resolution/resolver/framework/testing/fakecontroller.go @@ -33,8 +33,8 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/util/clock" "k8s.io/client-go/tools/record" + testclock "k8s.io/utils/clock/testing" "knative.dev/pkg/apis" cminformer "knative.dev/pkg/configmap/informer" "knative.dev/pkg/controller" @@ -45,7 +45,7 @@ import ( var ( now = time.Date(2022, time.January, 1, 0, 0, 0, 0, time.UTC) - testClock = clock.NewFakePassiveClock(now) + testClock = testclock.NewFakePassiveClock(now) ignoreLastTransitionTime = cmpopts.IgnoreFields(apis.Condition{}, "LastTransitionTime.Inner.Time") ) diff --git a/test/custom-task-ctrls/wait-task/cmd/controller/main.go b/test/custom-task-ctrls/wait-task/cmd/controller/main.go index 7953b2d0531..dd4e6a6bb6f 100644 --- a/test/custom-task-ctrls/wait-task/cmd/controller/main.go +++ b/test/custom-task-ctrls/wait-task/cmd/controller/main.go @@ -23,8 +23,8 @@ import ( runreconciler "github.com/tektoncd/pipeline/pkg/client/injection/reconciler/pipeline/v1alpha1/run" tkncontroller "github.com/tektoncd/pipeline/pkg/controller" "github.com/tektoncd/pipeline/test/wait-task/pkg/reconciler" - "k8s.io/apimachinery/pkg/util/clock" "k8s.io/client-go/tools/cache" + "k8s.io/utils/clock" "knative.dev/pkg/configmap" "knative.dev/pkg/controller" "knative.dev/pkg/injection/sharedmain" diff --git a/test/custom-task-ctrls/wait-task/go.mod b/test/custom-task-ctrls/wait-task/go.mod index 72306ab4c39..7ab16f21abe 100644 --- a/test/custom-task-ctrls/wait-task/go.mod +++ b/test/custom-task-ctrls/wait-task/go.mod @@ -8,5 +8,6 @@ require ( k8s.io/api v0.23.9 k8s.io/apimachinery v0.23.9 k8s.io/client-go v0.23.9 + k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 knative.dev/pkg v0.0.0-20220805012121-7b8b06028e4f ) diff --git a/test/custom-task-ctrls/wait-task/pkg/reconciler/reconciler.go b/test/custom-task-ctrls/wait-task/pkg/reconciler/reconciler.go index a783f20a49e..74ce261daf7 100644 --- a/test/custom-task-ctrls/wait-task/pkg/reconciler/reconciler.go +++ b/test/custom-task-ctrls/wait-task/pkg/reconciler/reconciler.go @@ -23,7 +23,7 @@ import ( "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1alpha1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/util/clock" + "k8s.io/utils/clock" "knative.dev/pkg/controller" "knative.dev/pkg/logging" kreconciler "knative.dev/pkg/reconciler" diff --git a/test/custom-task-ctrls/wait-task/pkg/reconciler/reconciler_test.go b/test/custom-task-ctrls/wait-task/pkg/reconciler/reconciler_test.go index 1b789077b3b..da38d3329f5 100644 --- a/test/custom-task-ctrls/wait-task/pkg/reconciler/reconciler_test.go +++ b/test/custom-task-ctrls/wait-task/pkg/reconciler/reconciler_test.go @@ -31,7 +31,7 @@ import ( "github.com/tektoncd/pipeline/test/parse" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/util/clock" + clock "k8s.io/utils/clock/testing" "knative.dev/pkg/apis" "knative.dev/pkg/test/helpers" )