From 7e4e1bce2547d2a515c6009329cd6a31a53a9dbc Mon Sep 17 00:00:00 2001 From: Jeevanandam M Date: Thu, 29 Dec 2016 10:55:44 -0800 Subject: [PATCH] test case update with code quality and info --- context17_test.go | 6 ++++++ context18_test.go | 6 ++++++ context_test.go | 8 +++++++- example_test.go | 4 ++++ request16.go | 6 ++++++ request17.go | 6 ++++++ resty_test.go | 2 +- 7 files changed, 36 insertions(+), 2 deletions(-) diff --git a/context17_test.go b/context17_test.go index 043e1b0a..8bd7bf69 100644 --- a/context17_test.go +++ b/context17_test.go @@ -1,5 +1,11 @@ // +build !go1.8 +// Copyright (c) 2015-2016 Jeevanandam M (jeeva@myjeeva.com) +// 2016 Andrew Grigorev (https://github.com/ei-grad) +// All rights reserved. +// resty source code and usage is governed by a MIT style +// license that can be found in the LICENSE file. + package resty import "strings" diff --git a/context18_test.go b/context18_test.go index 10ec8da6..610546c6 100644 --- a/context18_test.go +++ b/context18_test.go @@ -1,5 +1,11 @@ // +build go1.8 +// Copyright (c) 2015-2016 Jeevanandam M (jeeva@myjeeva.com) +// 2016 Andrew Grigorev (https://github.com/ei-grad) +// All rights reserved. +// resty source code and usage is governed by a MIT style +// license that can be found in the LICENSE file. + package resty import ( diff --git a/context_test.go b/context_test.go index de84a9fb..11bc891c 100644 --- a/context_test.go +++ b/context_test.go @@ -1,5 +1,11 @@ // +build go1.7 +// Copyright (c) 2015-2016 Jeevanandam M (jeeva@myjeeva.com) +// 2016 Andrew Grigorev (https://github.com/ei-grad) +// All rights reserved. +// resty source code and usage is governed by a MIT style +// license that can be found in the LICENSE file. + package resty import ( @@ -174,7 +180,7 @@ func TestClientRetryWithSetContext(t *testing.T) { if attempt != 3 { time.Sleep(time.Second * 2) } - w.Write([]byte("TestClientRetry page")) + _, _ = w.Write([]byte("TestClientRetry page")) }) defer ts.Close() diff --git a/example_test.go b/example_test.go index db033e4a..6125c0de 100644 --- a/example_test.go +++ b/example_test.go @@ -1,3 +1,7 @@ +// Copyright (c) 2015-2016 Jeevanandam M (jeeva@myjeeva.com), All rights reserved. +// resty source code and usage is governed by a MIT style +// license that can be found in the LICENSE file. + package resty_test import ( diff --git a/request16.go b/request16.go index 1292d557..bfab4701 100644 --- a/request16.go +++ b/request16.go @@ -1,5 +1,11 @@ // +build !go1.7 +// Copyright (c) 2015-2016 Jeevanandam M (jeeva@myjeeva.com) +// 2016 Andrew Grigorev (https://github.com/ei-grad) +// All rights reserved. +// resty source code and usage is governed by a MIT style +// license that can be found in the LICENSE file. + package resty import ( diff --git a/request17.go b/request17.go index 4303d54c..8fa7c947 100644 --- a/request17.go +++ b/request17.go @@ -1,5 +1,11 @@ // +build go1.7 +// Copyright (c) 2015-2016 Jeevanandam M (jeeva@myjeeva.com) +// 2016 Andrew Grigorev (https://github.com/ei-grad) +// All rights reserved. +// resty source code and usage is governed by a MIT style +// license that can be found in the LICENSE file. + package resty import ( diff --git a/resty_test.go b/resty_test.go index 6575e01a..07eba115 100644 --- a/resty_test.go +++ b/resty_test.go @@ -1273,7 +1273,7 @@ func TestContextInternal(t *testing.T) { r := R(). SetQueryParam("request_no", strconv.FormatInt(time.Now().Unix(), 10)) - if r.isContextCancelledIfAvailable() != false { + if r.isContextCancelledIfAvailable() { t.Error("isContextCancelledIfAvailable != false for vanilla R()") } r.addContextIfAvailable()