Browse Source

add \n to Printf lines

pull/1780/head
Anton Kaliaev 7 years ago
parent
commit
c532e8cabc
No known key found for this signature in database GPG Key ID: 7B6881D965918214
1 changed files with 7 additions and 7 deletions
  1. +7
    -7
      tests/server/client.go

+ 7
- 7
tests/server/client.go View File

@ -33,7 +33,7 @@ func SetOption(client abcicli.Client, key, value string) error {
log := res.GetLog() log := res.GetLog()
if err != nil { if err != nil {
fmt.Println("Failed test: SetOption") fmt.Println("Failed test: SetOption")
fmt.Printf("setting %v=%v: \nlog: %v", key, value, log)
fmt.Printf("setting %v=%v: \nlog: %v\n", key, value, log)
fmt.Println("Failed test: SetOption") fmt.Println("Failed test: SetOption")
return err return err
} }
@ -46,12 +46,12 @@ func Commit(client abcicli.Client, hashExp []byte) error {
_, data := res.Code, res.Data _, data := res.Code, res.Data
if err != nil { if err != nil {
fmt.Println("Failed test: Commit") fmt.Println("Failed test: Commit")
fmt.Printf("committing %v\nlog: %v", data, res.GetLog())
fmt.Printf("committing %v\nlog: %v\n", data, res.GetLog())
return err return err
} }
if !bytes.Equal(data, hashExp) { if !bytes.Equal(data, hashExp) {
fmt.Println("Failed test: Commit") fmt.Println("Failed test: Commit")
fmt.Printf("Commit hash was unexpected. Got %X expected %X",
fmt.Printf("Commit hash was unexpected. Got %X expected %X\n",
data.Bytes(), hashExp) data.Bytes(), hashExp)
return errors.New("CommitTx failed") return errors.New("CommitTx failed")
} }
@ -64,13 +64,13 @@ func DeliverTx(client abcicli.Client, txBytes []byte, codeExp uint32, dataExp []
code, data, log := res.Code, res.Data, res.Log code, data, log := res.Code, res.Data, res.Log
if code != codeExp { if code != codeExp {
fmt.Println("Failed test: DeliverTx") fmt.Println("Failed test: DeliverTx")
fmt.Printf("DeliverTx response code was unexpected. Got %v expected %v. Log: %v",
fmt.Printf("DeliverTx response code was unexpected. Got %v expected %v. Log: %v\n",
code, codeExp, log) code, codeExp, log)
return errors.New("DeliverTx error") return errors.New("DeliverTx error")
} }
if !bytes.Equal(data, dataExp) { if !bytes.Equal(data, dataExp) {
fmt.Println("Failed test: DeliverTx") fmt.Println("Failed test: DeliverTx")
fmt.Printf("DeliverTx response data was unexpected. Got %X expected %X",
fmt.Printf("DeliverTx response data was unexpected. Got %X expected %X\n",
data, dataExp) data, dataExp)
return errors.New("DeliverTx error") return errors.New("DeliverTx error")
} }
@ -83,13 +83,13 @@ func CheckTx(client abcicli.Client, txBytes []byte, codeExp uint32, dataExp []by
code, data, log := res.Code, res.Data, res.Log code, data, log := res.Code, res.Data, res.Log
if code != codeExp { if code != codeExp {
fmt.Println("Failed test: CheckTx") fmt.Println("Failed test: CheckTx")
fmt.Printf("CheckTx response code was unexpected. Got %v expected %v. Log: %v",
fmt.Printf("CheckTx response code was unexpected. Got %v expected %v. Log: %v\n",
code, codeExp, log) code, codeExp, log)
return errors.New("CheckTx") return errors.New("CheckTx")
} }
if !bytes.Equal(data, dataExp) { if !bytes.Equal(data, dataExp) {
fmt.Println("Failed test: CheckTx") fmt.Println("Failed test: CheckTx")
fmt.Printf("CheckTx response data was unexpected. Got %X expected %X",
fmt.Printf("CheckTx response data was unexpected. Got %X expected %X\n",
data, dataExp) data, dataExp)
return errors.New("CheckTx") return errors.New("CheckTx")
} }


Loading…
Cancel
Save