diff --git a/clients/storage/blob_test.go b/clients/storage/blob_test.go
index e017f251c1c0..5d5e5c732680 100644
--- a/clients/storage/blob_test.go
+++ b/clients/storage/blob_test.go
@@ -209,7 +209,7 @@ func TestListContainersPagination(t *testing.T) {
// Compare
if !reflect.DeepEqual(created, seen) {
- t.Fatal("Wrong pagination results:\nExpected:\t\t%v\nGot:\t\t%v", created, seen)
+ t.Fatalf("Wrong pagination results:\nExpected:\t\t%v\nGot:\t\t%v", created, seen)
}
}
@@ -312,7 +312,7 @@ func TestDeleteContainerIfExists(t *testing.T) {
t.Fatalf("Not supposed to return error, got: %s", err)
}
if expected := false; ok != expected {
- t.Fatal("Wrong deletion status. Expected: %v; Got: %v", expected, ok)
+ t.Fatalf("Wrong deletion status. Expected: %v; Got: %v", expected, ok)
}
// Existing container
@@ -325,7 +325,7 @@ func TestDeleteContainerIfExists(t *testing.T) {
t.Fatalf("Not supposed to return error, got: %s", err)
}
if expected := true; ok != expected {
- t.Fatal("Wrong deletion status. Expected: %v; Got: %v", expected, ok)
+ t.Fatalf("Wrong deletion status. Expected: %v; Got: %v", expected, ok)
}
}
@@ -580,7 +580,7 @@ func TestPutEmptyBlockBlob(t *testing.T) {
t.Fatal(err)
}
if props.ContentLength != 0 {
- t.Fatal("Wrong content length for empty blob: %s", props.ContentLength)
+ t.Fatalf("Wrong content length for empty blob: %d", props.ContentLength)
}
}
@@ -797,7 +797,7 @@ func TestGetBlockList_PutBlockList(t *testing.T) {
}
if expected := 1; len(uncommitted.UncommittedBlocks) != expected {
- t.Fatal("Uncommitted blocks wrong. Expected: %d, got: %d", expected, len(uncommitted.UncommittedBlocks))
+ t.Fatalf("Uncommitted blocks wrong. Expected: %d, got: %d", expected, len(uncommitted.UncommittedBlocks))
}
// Commit block list
diff --git a/clients/storage/util_test.go b/clients/storage/util_test.go
index 91af973fdef2..d1b2c7949ea7 100644
--- a/clients/storage/util_test.go
+++ b/clients/storage/util_test.go
@@ -50,13 +50,13 @@ func Test_prepareBlockListRequest(t *testing.T) {
empty := []Block{}
expected := ``
if out := prepareBlockListRequest(empty); expected != out {
- t.Error("Wrong block list. Expected: '%s', got: '%s'", expected, out)
+ t.Errorf("Wrong block list. Expected: '%s', got: '%s'", expected, out)
}
blocks := []Block{{"foo", BlockStatusLatest}, {"bar", BlockStatusUncommitted}}
expected = `foobar`
if out := prepareBlockListRequest(blocks); expected != out {
- t.Error("Wrong block list. Expected: '%s', got: '%s'", expected, out)
+ t.Errorf("Wrong block list. Expected: '%s', got: '%s'", expected, out)
}
}
diff --git a/core/http/transport_test.go b/core/http/transport_test.go
index 964ca0fca543..afa2e4a6028e 100644
--- a/core/http/transport_test.go
+++ b/core/http/transport_test.go
@@ -107,7 +107,7 @@ func (tcs *testConnSet) check(t *testing.T) {
tcs.mu.Lock()
continue
}
- t.Errorf("TCP connection #%d, %p (of %d total) was not closed", i+1, c, len(tcs.list))
+ t.Errorf("TCP connection #%d, %+v (of %d total) was not closed", i+1, c, len(tcs.list))
}
}
}