Signed-off-by: wefine <wang.xiaoren@zte.com.cn>
| ... | ... |
@@ -23,10 +23,10 @@ func TestParseArgs(t *testing.T) {
|
| 23 | 23 |
} |
| 24 | 24 |
} |
| 25 | 25 |
if len(args.Get("created")) != 1 {
|
| 26 |
- t.Errorf("failed to set this arg")
|
|
| 26 |
+ t.Error("failed to set this arg")
|
|
| 27 | 27 |
} |
| 28 | 28 |
if len(args.Get("image.name")) != 2 {
|
| 29 |
- t.Errorf("the args should have collapsed")
|
|
| 29 |
+ t.Error("the args should have collapsed")
|
|
| 30 | 30 |
} |
| 31 | 31 |
} |
| 32 | 32 |
|
| ... | ... |
@@ -147,7 +147,7 @@ func TestEmpty(t *testing.T) {
|
| 147 | 147 |
t.Errorf("%s", err)
|
| 148 | 148 |
} |
| 149 | 149 |
if a.Len() != v1.Len() {
|
| 150 |
- t.Errorf("these should both be empty sets")
|
|
| 150 |
+ t.Error("these should both be empty sets")
|
|
| 151 | 151 |
} |
| 152 | 152 |
} |
| 153 | 153 |
|
| ... | ... |
@@ -102,11 +102,11 @@ func TestNewEnvClient(t *testing.T) {
|
| 102 | 102 |
// pedantic checking that this is handled correctly |
| 103 | 103 |
tr := apiclient.client.Transport.(*http.Transport) |
| 104 | 104 |
if tr.TLSClientConfig == nil {
|
| 105 |
- t.Errorf("no tls config found when DOCKER_TLS_VERIFY enabled")
|
|
| 105 |
+ t.Error("no tls config found when DOCKER_TLS_VERIFY enabled")
|
|
| 106 | 106 |
} |
| 107 | 107 |
|
| 108 | 108 |
if tr.TLSClientConfig.InsecureSkipVerify {
|
| 109 |
- t.Errorf("tls verification should be enabled")
|
|
| 109 |
+ t.Error("tls verification should be enabled")
|
|
| 110 | 110 |
} |
| 111 | 111 |
} |
| 112 | 112 |
|
| ... | ... |
@@ -8,6 +8,6 @@ func TestDetectContentType(t *testing.T) {
|
| 8 | 8 |
input := []byte("That is just a plain text")
|
| 9 | 9 |
|
| 10 | 10 |
if contentType, _, err := DetectContentType(input); err != nil || contentType != "text/plain" {
|
| 11 |
- t.Errorf("TestDetectContentType failed")
|
|
| 11 |
+ t.Error("TestDetectContentType failed")
|
|
| 12 | 12 |
} |
| 13 | 13 |
} |
| ... | ... |
@@ -229,7 +229,7 @@ func TestResumableRequestReaderWithZeroTotalSize(t *testing.T) {
|
| 229 | 229 |
resstr := strings.TrimSuffix(string(data), "\n") |
| 230 | 230 |
|
| 231 | 231 |
if resstr != srvtxt {
|
| 232 |
- t.Errorf("resstr != srvtxt")
|
|
| 232 |
+ t.Error("resstr != srvtxt")
|
|
| 233 | 233 |
} |
| 234 | 234 |
} |
| 235 | 235 |
|
| ... | ... |
@@ -263,7 +263,7 @@ func TestResumableRequestReader(t *testing.T) {
|
| 263 | 263 |
resstr := strings.TrimSuffix(string(data), "\n") |
| 264 | 264 |
|
| 265 | 265 |
if resstr != srvtxt {
|
| 266 |
- t.Errorf("resstr != srvtxt")
|
|
| 266 |
+ t.Error("resstr != srvtxt")
|
|
| 267 | 267 |
} |
| 268 | 268 |
} |
| 269 | 269 |
|
| ... | ... |
@@ -302,6 +302,6 @@ func TestResumableRequestReaderWithInitialResponse(t *testing.T) {
|
| 302 | 302 |
resstr := strings.TrimSuffix(string(data), "\n") |
| 303 | 303 |
|
| 304 | 304 |
if resstr != srvtxt {
|
| 305 |
- t.Errorf("resstr != srvtxt")
|
|
| 305 |
+ t.Error("resstr != srvtxt")
|
|
| 306 | 306 |
} |
| 307 | 307 |
} |
| ... | ... |
@@ -46,7 +46,7 @@ func TestSortFileInfoSums(t *testing.T) {
|
| 46 | 46 |
fis = newFileInfoSums() |
| 47 | 47 |
fis.SortByPos() |
| 48 | 48 |
if fis[0].Pos() != 0 {
|
| 49 |
- t.Errorf("sorted fileInfoSums by Pos should order them by position.")
|
|
| 49 |
+ t.Error("sorted fileInfoSums by Pos should order them by position.")
|
|
| 50 | 50 |
} |
| 51 | 51 |
|
| 52 | 52 |
fis = newFileInfoSums() |
| ... | ... |
@@ -56,7 +56,7 @@ func TestSortFileInfoSums(t *testing.T) {
|
| 56 | 56 |
t.Errorf("Expected %q, got %q", expected, gotFileInfoSum)
|
| 57 | 57 |
} |
| 58 | 58 |
if fis.GetFile("noPresent") != nil {
|
| 59 |
- t.Errorf("Should have return nil if name not found.")
|
|
| 59 |
+ t.Error("Should have return nil if name not found.")
|
|
| 60 | 60 |
} |
| 61 | 61 |
|
| 62 | 62 |
} |