Skip to content

Commit e0f643f

Browse files
committed
cmd/swarm: fixed comments and remove sprintf from log.Info
1 parent 2bd4106 commit e0f643f

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

cmd/swarm/feeds_test.go

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ package main
1919
import (
2020
"bytes"
2121
"encoding/json"
22-
"fmt"
2322
"io/ioutil"
2423
"os"
2524
"testing"
@@ -69,7 +68,7 @@ func TestCLIFeedUpdate(t *testing.T) {
6968
hexData}
7069

7170
// create an update and expect an exit without errors
72-
log.Info(fmt.Sprintf("updating a feed with 'swarm feed update'"))
71+
log.Info("updating a feed with 'swarm feed update'")
7372
cmd := runSwarm(t, flags...)
7473
cmd.ExpectExit()
7574

@@ -116,7 +115,7 @@ func TestCLIFeedUpdate(t *testing.T) {
116115
"--user", address.Hex(),
117116
}
118117

119-
log.Info(fmt.Sprintf("getting feed info with 'swarm feed info'"))
118+
log.Info("getting feed info with 'swarm feed info'")
120119
cmd = runSwarm(t, flags...)
121120
_, matches := cmd.ExpectRegexp(`.*`) // regex hack to extract stdout
122121
cmd.ExpectExit()
@@ -141,7 +140,7 @@ func TestCLIFeedUpdate(t *testing.T) {
141140
"--topic", topic.Hex(),
142141
}
143142

144-
log.Info(fmt.Sprintf("Publishing manifest with 'swarm feed create'"))
143+
log.Info("Publishing manifest with 'swarm feed create'")
145144
cmd = runSwarm(t, flags...)
146145
_, matches = cmd.ExpectRegexp(`[a-f\d]{64}`) // regex hack to extract stdout
147146
cmd.ExpectExit()
@@ -166,13 +165,12 @@ func TestCLIFeedUpdate(t *testing.T) {
166165
// test publishing a manifest for a different user
167166
flags = []string{
168167
"--bzzapi", srv.URL,
169-
"--bzzaccount", pkFileName,
170168
"feed", "create",
171169
"--topic", topic.Hex(),
172170
"--user", "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", // different user
173171
}
174172

175-
log.Info(fmt.Sprintf("Publishing manifest with 'swarm feed create' for a different user"))
173+
log.Info("Publishing manifest with 'swarm feed create' for a different user")
176174
cmd = runSwarm(t, flags...)
177175
_, matches = cmd.ExpectRegexp(`[a-f\d]{64}`) // regex hack to extract stdout
178176
cmd.ExpectExit()
@@ -187,8 +185,8 @@ func TestCLIFeedUpdate(t *testing.T) {
187185
"--manifest", manifestAddress,
188186
hexData}
189187

190-
// create an update and expect an exit without errors
191-
log.Info(fmt.Sprintf("updating a feed with 'swarm feed update'"))
188+
// create an update and expect an error given there is a user mismatch
189+
log.Info("updating a feed with 'swarm feed update'")
192190
cmd = runSwarm(t, flags...)
193191
cmd.ExpectRegexp("Fatal:.*") // best way so far to detect a failure.
194192
cmd.ExpectExit()

0 commit comments

Comments
 (0)