Browse code

Fix misuses of format based logging functions

Signed-off-by: Tõnis Tiigi <tonistiigi@gmail.com> (github: tonistiigi)

Tonis Tiigi authored on 2014/11/20 06:24:16
Showing 4 changed files
... ...
@@ -33,7 +33,7 @@ func newDriver(t *testing.T, name string) *Driver {
33 33
 	d, err := graphdriver.GetDriver(name, root, nil)
34 34
 	if err != nil {
35 35
 		if err == graphdriver.ErrNotSupported || err == graphdriver.ErrPrerequisites {
36
-			t.Skip("Driver %s not supported", name)
36
+			t.Skipf("Driver %s not supported", name)
37 37
 		}
38 38
 		t.Fatal(err)
39 39
 	}
... ...
@@ -112,7 +112,7 @@ func StoreImage(img *Image, layerData archive.ArchiveReader, root string) error
112 112
 		checksum := layerTarSum.Sum(nil)
113 113
 
114 114
 		if img.Checksum != "" && img.Checksum != checksum {
115
-			log.Warn("image layer checksum mismatch: computed %q, expected %q", checksum, img.Checksum)
115
+			log.Warnf("image layer checksum mismatch: computed %q, expected %q", checksum, img.Checksum)
116 116
 		}
117 117
 
118 118
 		img.Checksum = checksum
... ...
@@ -220,7 +220,7 @@ func TestEventsImagePull(t *testing.T) {
220 220
 	since := time.Now().Unix()
221 221
 	pullCmd := exec.Command(dockerBinary, "pull", "scratch")
222 222
 	if out, _, err := runCommandWithOutput(pullCmd); err != nil {
223
-		t.Fatal("pulling the scratch image from has failed: %s, %v", out, err)
223
+		t.Fatalf("pulling the scratch image from has failed: %s, %v", out, err)
224 224
 	}
225 225
 
226 226
 	eventsCmd := exec.Command(dockerBinary, "events",
... ...
@@ -11,7 +11,7 @@ import (
11 11
 func TestNetworkNat(t *testing.T) {
12 12
 	iface, err := net.InterfaceByName("eth0")
13 13
 	if err != nil {
14
-		t.Skip("Test not running with `make test`. Interface eth0 not found: %s", err)
14
+		t.Skipf("Test not running with `make test`. Interface eth0 not found: %s", err)
15 15
 	}
16 16
 
17 17
 	ifaceAddrs, err := iface.Addrs()