signer: remove ineffectual assignments

This commit is contained in:
Martin Holst Swende 2018-11-07 13:40:02 +01:00
parent 3e1cfbae93
commit 1e372d7fa7
No known key found for this signature in database
GPG key ID: 683B438C05A5DDF0
2 changed files with 8 additions and 4 deletions

View file

@ -45,6 +45,10 @@ func verify(t *testing.T, jsondata, calldata string, exp []interface{}) {
data, err := method.Inputs.UnpackValues(argdata) data, err := method.Inputs.UnpackValues(argdata)
if err != nil {
t.Fatal(err)
}
if len(data) != len(exp) { if len(data) != len(exp) {
t.Fatalf("Mismatched length, expected %d, got %d", len(exp), len(data)) t.Fatalf("Mismatched length, expected %d, got %d", len(exp), len(data))
} }

View file

@ -151,7 +151,7 @@ func TestListRequest(t *testing.T) {
t.Errorf("Couldn't create evaluator %v", err) t.Errorf("Couldn't create evaluator %v", err)
return return
} }
resp, err := r.ApproveListing(&core.ListRequest{ resp, _ := r.ApproveListing(&core.ListRequest{
Accounts: accs, Accounts: accs,
Meta: core.Metadata{Remote: "remoteip", Local: "localip", Scheme: "inproc"}, Meta: core.Metadata{Remote: "remoteip", Local: "localip", Scheme: "inproc"},
}) })
@ -515,7 +515,7 @@ func TestLimitWindow(t *testing.T) {
r.OnApprovedTx(response) r.OnApprovedTx(response)
} }
// Fourth should fail // Fourth should fail
resp, err := r.ApproveTx(dummyTx(h)) resp, _ := r.ApproveTx(dummyTx(h))
if resp.Approved { if resp.Approved {
t.Errorf("Expected check to resolve to 'Reject'") t.Errorf("Expected check to resolve to 'Reject'")
} }
@ -609,8 +609,8 @@ func TestContextIsCleared(t *testing.T) {
t.Fatalf("Failed to load bootstrap js: %v", err) t.Fatalf("Failed to load bootstrap js: %v", err)
} }
tx := dummyTxWithV(0) tx := dummyTxWithV(0)
r1, err := r.ApproveTx(tx) r1, _ := r.ApproveTx(tx)
r2, err := r.ApproveTx(tx) r2, _ := r.ApproveTx(tx)
if r1.Approved != r2.Approved { if r1.Approved != r2.Approved {
t.Errorf("Expected execution context to be cleared between executions") t.Errorf("Expected execution context to be cleared between executions")
} }