From 90bbe0453d89440bceb246fad82c8d389813655c Mon Sep 17 00:00:00 2001 From: popcor255 Date: Tue, 2 Mar 2021 16:32:35 -0500 Subject: [PATCH] Remove Test Builders from remote_tests.go It is better to have simple tests with full objects than test builders as of Issue #3178. Since, they are easier to maintain and are easier to read. --- test/remote_test.go | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/test/remote_test.go b/test/remote_test.go index d7872b5f797..cb8d88f59f8 100644 --- a/test/remote_test.go +++ b/test/remote_test.go @@ -29,8 +29,9 @@ import ( "github.com/google/go-containerregistry/pkg/name" "github.com/google/go-containerregistry/pkg/registry" "github.com/google/go-containerregistry/pkg/v1/remote" - tb "github.com/tektoncd/pipeline/internal/builder/v1beta1" + "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" tkremote "github.com/tektoncd/pipeline/pkg/remote/oci" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) func TestCreateImage(t *testing.T) { @@ -39,7 +40,15 @@ func TestCreateImage(t *testing.T) { defer s.Close() u, _ := url.Parse(s.URL) - task := tb.Task("test-create-image", tb.TaskType) + task := &v1beta1.Task{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test-create-image", + }, + TypeMeta: metav1.TypeMeta{ + APIVersion: "tekton.dev/v1beta1", + Kind: "Task", + }, + } ref, err := CreateImage(u.Host+"/task/test-create-image", task) if err != nil {