Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes 0.6.0 version compatibility issues #223

Merged
merged 2 commits into from
Aug 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ man: bin/docs ## update manpages
clean: ## clean build artifacts
rm -fR bin

.PHONY: fmt ## formats teh god code(excludes vendors dir)
fmt:
@go fmt $(go list ./... | grep -v /vendor/)

.PHONY: help
help: ## print this help
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z0-9_-]+:.*?## / {gsub("\\\\n",sprintf("\n%22c",""), $$2);printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
11 changes: 8 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ go 1.12
require (
cloud.google.com/go v0.37.2 // indirect
contrib.go.opencensus.io/exporter/ocagent v0.2.0 // indirect
contrib.go.opencensus.io/exporter/prometheus v0.1.0 // indirect
contrib.go.opencensus.io/exporter/stackdriver v0.9.1 // indirect
github.com/AlecAivazis/survey/v2 v2.0.1
github.com/Azure/azure-sdk-for-go v26.1.0+incompatible // indirect
github.com/Azure/go-autorest v11.6.0+incompatible // indirect
github.com/Netflix/go-expect v0.0.0-20180928190340-9d1f4485533b
github.com/apache/thrift v0.12.0 // indirect
github.com/aws/aws-sdk-go v1.19.11 // indirect
github.com/blang/semver v3.5.1+incompatible
github.com/census-instrumentation/opencensus-proto v0.1.0 // indirect
Expand All @@ -19,30 +21,32 @@ require (
github.com/fatih/color v1.7.0
github.com/ghodss/yaml v1.0.0 // indirect
github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef // indirect
github.com/google/go-cmp v0.2.0
github.com/google/go-cmp v0.3.1
github.com/google/go-containerregistry v0.0.0-20190320210540-8d4083db9aa0 // indirect
github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367 // indirect
github.com/google/uuid v1.1.1 // indirect
github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d // indirect
github.com/hako/durafmt v0.0.0-20180520121703-7b7ae1e72ead
github.com/hinshun/vt10x v0.0.0-20180809195222-d55458df857c
github.com/imdario/mergo v0.3.7 // indirect
github.com/jonboulle/clockwork v0.1.1-0.20190114141812-62fb9bc030d1
github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3 // indirect
github.com/knative/pkg v0.0.0-20190409220258-28cfa161499b
github.com/kr/pretty v0.1.0 // indirect
github.com/kr/pty v1.1.8 // indirect
github.com/markbates/inflect v1.0.4 // indirect
github.com/mattbaird/jsonpatch v0.0.0-20171005235357-81af80346b1a // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742 // indirect
github.com/openzipkin/zipkin-go v0.1.6 // indirect
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
github.com/pkg/errors v0.8.1
github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829 // indirect
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 // indirect
github.com/prometheus/procfs v0.0.0-20190322151404-55ae3d9d5573 // indirect
github.com/spf13/cobra v0.0.5
github.com/spf13/pflag v1.0.3
github.com/stretchr/testify v1.2.2
github.com/tektoncd/pipeline v0.5.2
github.com/tektoncd/pipeline v0.6.0
github.com/tektoncd/plumbing v0.0.0-20190604151109-373083123d6a
go.uber.org/atomic v1.3.2 // indirect
go.uber.org/multierr v1.1.0 // indirect
Expand All @@ -58,6 +62,7 @@ require (
k8s.io/klog v0.2.0 // indirect
k8s.io/kube-openapi v0.0.0-20171101183504-39a7bf85c140 // indirect
k8s.io/kubernetes v1.13.3 // indirect
knative.dev/pkg v0.0.0-20190719141030-e4bc08cc8ded
sigs.k8s.io/yaml v1.1.0 // indirect
)

Expand Down
19 changes: 19 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ cloud.google.com/go v0.37.2 h1:4y4L7BdHenTfZL0HervofNTHh9Ad6mNX72cQvl+5eH0=
cloud.google.com/go v0.37.2/go.mod h1:H8IAquKe2L30IxoupDgqTaQvKSwF/c8prYHynGIWQbA=
contrib.go.opencensus.io/exporter/ocagent v0.2.0 h1:Q/jXnVbliDYozuWJni9452xsSUuo+y8yrioxRgofBhE=
contrib.go.opencensus.io/exporter/ocagent v0.2.0/go.mod h1:0fnkYHF+ORKj7HWzOExKkUHeFX79gXSKUQbpnAM+wzo=
contrib.go.opencensus.io/exporter/prometheus v0.1.0 h1:SByaIoWwNgMdPSgl5sMqM2KDE5H/ukPWBRo314xiDvg=
contrib.go.opencensus.io/exporter/prometheus v0.1.0/go.mod h1:cGFniUXGZlKRjzOyuZJ6mgB+PgBcCIa79kEKR8YCW+A=
contrib.go.opencensus.io/exporter/stackdriver v0.9.1 h1:W6APgQ9we4BH8U8bnq/FvwLKo2WSMHuiMkkS/Slkg30=
contrib.go.opencensus.io/exporter/stackdriver v0.9.1/go.mod h1:hNe5qQofPbg6bLQY5wHCvQ7o+2E5P8PkegEuQ+MyRw0=
git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg=
Expand Down Expand Up @@ -90,6 +92,8 @@ github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c h1:964Od4U6p2jUkFxvCy
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/go-cmp v0.2.0 h1:+dTQ8DZQJz0Mb/HjFlkptS1FeQ4cWSnN941F8aEG4SQ=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
github.com/google/go-cmp v0.3.1 h1:Xye71clBPdm5HgqGwUkwhbynsUJZhDbS20FvLhQ2izg=
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-containerregistry v0.0.0-20190320210540-8d4083db9aa0 h1:NPHi7Dw3wo3MpehiKV4YOZDKMA4RcwpRAdi77NSW/5s=
github.com/google/go-containerregistry v0.0.0-20190320210540-8d4083db9aa0/go.mod h1:yZAFP63pRshzrEYLXLGPmUt0Ay+2zdjmMN1loCnRLUk=
github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ=
Expand All @@ -98,6 +102,8 @@ github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367 h1:ScAXWS+TR6MZKex+7
github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI=
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY=
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/googleapis/gax-go v2.0.0+incompatible h1:j0GKcs05QVmm7yesiZq2+9cxHkNK9YM6zKx4D2qucQU=
github.com/googleapis/gax-go v2.0.0+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY=
github.com/googleapis/gax-go/v2 v2.0.4 h1:hU4mGcQI4DaAYW+IbTun+2qEZVFxK0ySjQLTbS0VQKc=
Expand Down Expand Up @@ -186,17 +192,20 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
github.com/prometheus/client_golang v0.9.2/go.mod h1:OsXs2jCmiKlQ1lTBmv21f2mNfw4xf/QclQDMrYNZzcM=
github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829 h1:D+CiwcpGTW6pL6bv6KI3KbyEyCKyS+1JWS2h8PNDnGA=
github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs=
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 h1:S/YWwWx/RA8rT8tKFRuGUZhuA90OyIBpPCXkcbwU8DE=
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=
github.com/prometheus/common v0.0.0-20181126121408-4724e9255275/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=
github.com/prometheus/common v0.2.0 h1:kUZDBDTdBVBYBj5Tmh2NZLlF60mfjA27rM34b+cVwNU=
github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.0-20190322151404-55ae3d9d5573 h1:gAuD3LIrjkoOOPLlhGlZWZXztrQII9a9kT6HS5jFtSY=
github.com/prometheus/procfs v0.0.0-20190322151404-55ae3d9d5573/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
Expand All @@ -219,6 +228,8 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf
github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA=
github.com/tektoncd/pipeline v0.5.2 h1:3+OSjEamMxBM+qIvhZowE6rSLWZdtUT3jSkqIDG5MnA=
github.com/tektoncd/pipeline v0.5.2/go.mod h1:IZzJdiX9EqEMuUcgdnElozdYYRh0/ZRC+NKMLj1K3Yw=
github.com/tektoncd/pipeline v0.6.0 h1:kYN3Ejm2T9GuXcIdAZc76aIUZqUqPTcfEx/7e7DgQlI=
github.com/tektoncd/pipeline v0.6.0/go.mod h1:IZzJdiX9EqEMuUcgdnElozdYYRh0/ZRC+NKMLj1K3Yw=
github.com/tektoncd/plumbing v0.0.0-20190604151109-373083123d6a h1:4HMTW2uHdQIm8XabCE6P4z/ikCx9eqK8Tvo3noR5RV4=
github.com/tektoncd/plumbing v0.0.0-20190604151109-373083123d6a/go.mod h1:dvZoTaPGpr3ZDqOUR1sc8VOhh/7OzYncVnbQETJTqvQ=
github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0=
Expand All @@ -229,6 +240,8 @@ go.opencensus.io v0.18.0/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA=
go.opencensus.io v0.19.1/go.mod h1:gug0GbSHa8Pafr0d2urOSgoXHZ6x/RUlaiT0d9pqb4A=
go.opencensus.io v0.19.2 h1:ZZpq6xI6kv/LuE/5s5UQvBU5vMjvRnPb8PvJrIntAnc=
go.opencensus.io v0.19.2/go.mod h1:NO/8qkisMZLZ1FCsKNqtJPwc8/TaclWyY0B6wcYNg9M=
go.opencensus.io v0.21.0 h1:mU6zScU4U1YAFPHEHYk+3JC4SY7JxgkqS10ZOSyksNg=
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
go.uber.org/atomic v1.3.2 h1:2Oa65PReHzfn29GpvgsYwloV9AVFHPDk8tYxt2c2tr4=
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/multierr v1.1.0 h1:HoEmRHQPVSqub6w2z2d2EOVs2fjyFRGyofhKuyDq0QI=
Expand Down Expand Up @@ -257,6 +270,7 @@ golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73r
golang.org/x/net v0.0.0-20181029044818-c44066c5c816/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181106065722-10aee1819953/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
Expand Down Expand Up @@ -364,5 +378,10 @@ k8s.io/kube-openapi v0.0.0-20171101183504-39a7bf85c140 h1:j1Zez+Xb4OWvCdROqeq8sP
k8s.io/kube-openapi v0.0.0-20171101183504-39a7bf85c140/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc=
k8s.io/kubernetes v1.13.3 h1:46t44D87wKtdKFgr/lXM60K8xPrW0wO67Woof3Vsv6E=
k8s.io/kubernetes v1.13.3/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk=
knative.dev/pkg v0.0.0-20190719141030-e4bc08cc8ded h1:CHn7mNgIE5GHMJqfNPFLBLcZlCdaTdQmAA8Uu6XLOKc=
knative.dev/pkg v0.0.0-20190719141030-e4bc08cc8ded/go.mod h1:pgODObA1dTyhNoFxPZTTjNWfx6F0aKsKzn+vaT9XO/Q=
knative.dev/pkg v0.0.0-20190817231834-12ee58e32cc8 h1:GDSaSL05bUpC4JtShhWTXKIG/uualFfN6td0cdXaw7k=
knative.dev/pkg v0.0.0-20190817231834-12ee58e32cc8/go.mod h1:pgODObA1dTyhNoFxPZTTjNWfx6F0aKsKzn+vaT9XO/Q=
knative.dev/pkg v0.0.0-20190820015002-9cc6a645418f h1:H/VzwXgSNDRRTCpA5H/Xcc6o2IUAUpQxtpCoaO1QxF0=
sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs=
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
7 changes: 3 additions & 4 deletions pkg/cmd/clustertask/list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,22 @@ import (
"github.com/google/go-cmp/cmp"
"github.com/jonboulle/clockwork"
"github.com/tektoncd/cli/pkg/test"
tu "github.com/tektoncd/cli/pkg/test"
cb "github.com/tektoncd/cli/pkg/test/builder"
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1alpha1"
pipelinetest "github.com/tektoncd/pipeline/test"
tb "github.com/tektoncd/pipeline/test/builder"
)

func TestClusterTaskList_Empty(t *testing.T) {
cs, _ := pipelinetest.SeedTestData(t, pipelinetest.Data{})
cs, _ := test.SeedTestData(t, pipelinetest.Data{})
p := &test.Params{Tekton: cs.Pipeline}

clustertask := Command(p)
output, err := test.ExecuteCommand(clustertask, "list", "-n", "foo")
if err != nil {
t.Errorf("Unexpected error: %v", err)
}
tu.AssertOutput(t, emptyMsg+"\n", output)
test.AssertOutput(t, emptyMsg+"\n", output)
}

func TestClusterTaskListOnlyClusterTasks(t *testing.T) {
Expand All @@ -49,7 +48,7 @@ func TestClusterTaskListOnlyClusterTasks(t *testing.T) {
tb.ClusterTask("pineapple", cb.ClusterTaskCreationTime(clock.Now().Add(-512*time.Hour))),
}

cs, _ := pipelinetest.SeedTestData(t, pipelinetest.Data{ClusterTasks: clustertasks})
cs, _ := test.SeedTestData(t, pipelinetest.Data{ClusterTasks: clustertasks})
p := &test.Params{Tekton: cs.Pipeline, Clock: clock}

clustertask := Command(p)
Expand Down
13 changes: 6 additions & 7 deletions pkg/cmd/pipeline/describe_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,18 @@ import (

"github.com/google/go-cmp/cmp"
"github.com/jonboulle/clockwork"
"github.com/knative/pkg/apis"
"github.com/tektoncd/cli/pkg/test"
tu "github.com/tektoncd/cli/pkg/test"
cb "github.com/tektoncd/cli/pkg/test/builder"
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1alpha1"
"github.com/tektoncd/pipeline/pkg/reconciler/v1alpha1/pipelinerun/resources"
pipelinetest "github.com/tektoncd/pipeline/test"
tb "github.com/tektoncd/pipeline/test/builder"
corev1 "k8s.io/api/core/v1"
"knative.dev/pkg/apis"
)

func TestPipelineDescribe_Empty(t *testing.T) {
cs, _ := pipelinetest.SeedTestData(t, pipelinetest.Data{})
cs, _ := test.SeedTestData(t, pipelinetest.Data{})
p := &test.Params{Tekton: cs.Pipeline}

pipeline := Command(p)
Expand All @@ -42,13 +41,13 @@ func TestPipelineDescribe_Empty(t *testing.T) {
t.Errorf("Error expected here")
}
expected := "pipelines.tekton.dev \"bar\" not found"
tu.AssertOutput(t, expected, err.Error())
test.AssertOutput(t, expected, err.Error())
}

func TestPipelinesDescribe_with_run(t *testing.T) {
clock := clockwork.NewFakeClock()

cs, _ := pipelinetest.SeedTestData(t, pipelinetest.Data{
cs, _ := test.SeedTestData(t, pipelinetest.Data{
Pipelines: []*v1alpha1.Pipeline{
tb.Pipeline("pipeline", "ns",
// created 5 minutes back
Expand Down Expand Up @@ -109,7 +108,7 @@ func TestPipelinesDescribe_with_run(t *testing.T) {
func TestPipelinesDescribe_with_task_run(t *testing.T) {
clock := clockwork.NewFakeClock()

cs, _ := pipelinetest.SeedTestData(t, pipelinetest.Data{
cs, _ := test.SeedTestData(t, pipelinetest.Data{
Pipelines: []*v1alpha1.Pipeline{
tb.Pipeline("pipeline", "ns",
// created 5 minutes back
Expand Down Expand Up @@ -175,7 +174,7 @@ func TestPipelinesDescribe_with_task_run(t *testing.T) {
func TestPipelinesDescribe_with_resource_task_run(t *testing.T) {
clock := clockwork.NewFakeClock()

cs, _ := pipelinetest.SeedTestData(t, pipelinetest.Data{
cs, _ := test.SeedTestData(t, pipelinetest.Data{
Pipelines: []*v1alpha1.Pipeline{
tb.Pipeline("pipeline", "ns",
// created 5 minutes back
Expand Down
13 changes: 6 additions & 7 deletions pkg/cmd/pipeline/list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ import (

"github.com/google/go-cmp/cmp"
"github.com/jonboulle/clockwork"
"github.com/knative/pkg/apis"
"github.com/tektoncd/cli/pkg/test"
tu "github.com/tektoncd/cli/pkg/test"
cb "github.com/tektoncd/cli/pkg/test/builder"
"knative.dev/pkg/apis"

"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1alpha1"
"github.com/tektoncd/pipeline/pkg/reconciler/v1alpha1/pipelinerun/resources"
Expand All @@ -21,15 +20,15 @@ import (

func TestPipelinesList_empty(t *testing.T) {

cs, _ := pipelinetest.SeedTestData(t, pipelinetest.Data{})
cs, _ := test.SeedTestData(t, pipelinetest.Data{})
p := &test.Params{Tekton: cs.Pipeline}

pipeline := Command(p)
output, err := test.ExecuteCommand(pipeline, "list", "-n", "foo")
if err != nil {
t.Errorf("Unexpected error: %v", err)
}
tu.AssertOutput(t, "No pipelines\n", output)
test.AssertOutput(t, "No pipelines\n", output)
}

func TestPipelineList_only_pipelines(t *testing.T) {
Expand Down Expand Up @@ -66,7 +65,7 @@ func TestPipelineList_only_pipelines(t *testing.T) {
func TestPipelinesList_with_single_run(t *testing.T) {
clock := clockwork.NewFakeClock()

cs, _ := pipelinetest.SeedTestData(t, pipelinetest.Data{
cs, _ := test.SeedTestData(t, pipelinetest.Data{
Pipelines: []*v1alpha1.Pipeline{
tb.Pipeline("pipeline", "ns",
// created 5 minutes back
Expand Down Expand Up @@ -142,7 +141,7 @@ func TestPipelinesList_latest_run(t *testing.T) {
secondRunCompleted = secondRunStarted.Add(runDuration) // takes less thus completes
)

cs, _ := pipelinetest.SeedTestData(t, pipelinetest.Data{
cs, _ := test.SeedTestData(t, pipelinetest.Data{
Pipelines: []*v1alpha1.Pipeline{
tb.Pipeline("pipeline", "ns",
// created 5 minutes back
Expand Down Expand Up @@ -217,5 +216,5 @@ func seedPipelines(t *testing.T, clock clockwork.Clock, ps []pipelineDetails, ns
)
}

return pipelinetest.SeedTestData(t, pipelinetest.Data{Pipelines: pipelines})
return test.SeedTestData(t, pipelinetest.Data{Pipelines: pipelines})
}
Loading