From 82b63eed319f374b225e7c9d4dcc93d9bd144e14 Mon Sep 17 00:00:00 2001 From: Roland Swingler Date: Tue, 10 Apr 2018 17:19:41 +0100 Subject: [PATCH] [RP-XXX] Get tests passing on go 1.10.1 --- cli/pipeline/pipeline_definition_test.go | 2 +- cli/pipeline/run_test.go | 2 +- cli/pipeline/watch.go | 2 +- cli/pipeline/watch_test.go | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cli/pipeline/pipeline_definition_test.go b/cli/pipeline/pipeline_definition_test.go index cc7f106..a61710c 100644 --- a/cli/pipeline/pipeline_definition_test.go +++ b/cli/pipeline/pipeline_definition_test.go @@ -13,7 +13,7 @@ func TestParsePipeline(t *testing.T) { pipeline := parsePipeline(data) if len(pipeline.Steps) != 2 { - t.Errorf("excepted two steps, got %i", len(pipeline.Steps)) + t.Errorf("excepted two steps, got %d", len(pipeline.Steps)) } if pipeline.Bucket != "canoe-sample-pipeline" { diff --git a/cli/pipeline/run_test.go b/cli/pipeline/run_test.go index 4030520..3db66b0 100644 --- a/cli/pipeline/run_test.go +++ b/cli/pipeline/run_test.go @@ -207,7 +207,7 @@ func TestRunPipelineStartTimeout(t *testing.T) { if len(errors) != 2 { t.Errorf("excepted two errors, actual %v", len(errors)) } - msg := "[paddle] [Timeout waiting for pod to start. Cluster might not have sufficient resources.]" + msg := "[paddle] [Timed out waiting for pod to start. Cluster might not have sufficient resources.]" for _, err := range errors { if err != msg { t.Errorf("Expected timeout error, got %s", err) diff --git a/cli/pipeline/watch.go b/cli/pipeline/watch.go index f73bcfe..0e84542 100644 --- a/cli/pipeline/watch.go +++ b/cli/pipeline/watch.go @@ -122,7 +122,7 @@ func Watch(ctx context.Context, c kubernetes.Interface, watchPod *v1.Pod) (<-cha parsePodStatus(pod) } else { if err != nil { - log.Println("Error polling pod status: %s", err.Error()) + log.Printf("Error polling pod status: %s\n", err.Error()) } else { log.Println("No pod status") } diff --git a/cli/pipeline/watch_test.go b/cli/pipeline/watch_test.go index 3da53d8..88202aa 100644 --- a/cli/pipeline/watch_test.go +++ b/cli/pipeline/watch_test.go @@ -52,12 +52,12 @@ func TestWatch(t *testing.T) { types := []WatchEventType{Added, Added, Completed, Removed, Failed} if len(events) != len(types) { - t.Errorf("Expected %i events, got %i", len(types), len(events)) + t.Errorf("Expected %d events, got %d", len(types), len(events)) } for i, et := range types { if events[i].Type != et { - t.Errorf("Event %i type is %v, expected %v", i, events[i].Type, et) + t.Errorf("Event %d type is %v, expected %v", i, events[i].Type, et) } } }