Skip to content

Commit

Permalink
test case update with code quality and info
Browse files Browse the repository at this point in the history
  • Loading branch information
jeevatkm committed Dec 29, 2016
1 parent cca8945 commit 7e4e1bc
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 2 deletions.
6 changes: 6 additions & 0 deletions 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"
Expand Down
6 changes: 6 additions & 0 deletions 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 (
Expand Down
8 changes: 7 additions & 1 deletion 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 (
Expand Down Expand Up @@ -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()

Expand Down
4 changes: 4 additions & 0 deletions 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 (
Expand Down
6 changes: 6 additions & 0 deletions 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 (
Expand Down
6 changes: 6 additions & 0 deletions 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 (
Expand Down
2 changes: 1 addition & 1 deletion resty_test.go
Expand Up @@ -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()
Expand Down

0 comments on commit 7e4e1bc

Please sign in to comment.