Merge PR #1281: Don't run defers if it would result in an NPE

* Don't run defers if it would result in an NPE
* Nuke CircleCI caches
This commit is contained in:
Dev Ojha
2018-06-16 09:49:55 +02:00
committed by Christopher Goes
parent 364bb0813f
commit 1f88b0bf8f
5 changed files with 33 additions and 29 deletions
+14 -14
View File
@@ -87,7 +87,7 @@ func TestKeys(t *testing.T) {
// update key
jsonStr = []byte(fmt.Sprintf(`{
"old_password":"%s",
"old_password":"%s",
"new_password":"12345678901"
}`, newPassword))
@@ -347,8 +347,8 @@ func TestTxs(t *testing.T) {
func TestValidatorsQuery(t *testing.T) {
cleanup, pks, port := InitializeTestLCD(t, 2, []sdk.Address{})
require.Equal(t, 2, len(pks))
defer cleanup()
require.Equal(t, 2, len(pks))
validators := getValidators(t, port)
assert.Equal(t, len(validators), 2)
@@ -448,12 +448,12 @@ func doSend(t *testing.T, port, seed, name, password string, addr sdk.Address) (
}
jsonStr := []byte(fmt.Sprintf(`{
"name":"%s",
"name":"%s",
"password":"%s",
"account_number":%d,
"sequence":%d,
"account_number":%d,
"sequence":%d,
"gas": 10000,
"amount":[%s]
"amount":[%s]
}`, name, password, accnum, sequence, coinbz))
res, body := Request(t, port, "POST", "/accounts/"+receiveAddrBech+"/send", jsonStr)
require.Equal(t, http.StatusOK, res.StatusCode, body)
@@ -478,18 +478,18 @@ func doIBCTransfer(t *testing.T, port, seed, name, password string, addr sdk.Add
sequence := acc.GetSequence()
// send
jsonStr := []byte(fmt.Sprintf(`{
"name":"%s",
"password": "%s",
jsonStr := []byte(fmt.Sprintf(`{
"name":"%s",
"password": "%s",
"account_number":%d,
"sequence": %d,
"sequence": %d,
"gas": 100000,
"amount":[
{
"denom": "%s",
"amount": 1
{
"denom": "%s",
"amount": 1
}
]
]
}`, name, password, accnum, sequence, "steak"))
res, body := Request(t, port, "POST", "/ibc/testchain/"+receiveAddrBech+"/send", jsonStr)
require.Equal(t, http.StatusOK, res.StatusCode, body)