Skip to content

Commit b45601d

Browse files
committed
commands: Fixed tests
1 parent dfd4c03 commit b45601d

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

command_test.go

+8-8
Original file line numberDiff line numberDiff line change
@@ -17,58 +17,58 @@ func TestOptionValidation(t *testing.T) {
1717

1818
opts, _ := cmd.GetOptions(nil)
1919

20-
req := NewRequest(nil, nil, nil, nil, opts)
20+
req, _ := NewRequest(nil, nil, nil, nil, opts)
2121
req.SetOption("beep", true)
2222
res := cmd.Call(req)
2323
if res.Error() == nil {
2424
t.Error("Should have failed (incorrect type)")
2525
}
2626

27-
req = NewRequest(nil, nil, nil, nil, opts)
27+
req, _ = NewRequest(nil, nil, nil, nil, opts)
2828
req.SetOption("beep", 5)
2929
res = cmd.Call(req)
3030
if res.Error() != nil {
3131
t.Error(res.Error(), "Should have passed")
3232
}
3333

34-
req = NewRequest(nil, nil, nil, nil, opts)
34+
req, _ = NewRequest(nil, nil, nil, nil, opts)
3535
req.SetOption("beep", 5)
3636
req.SetOption("boop", "test")
3737
res = cmd.Call(req)
3838
if res.Error() != nil {
3939
t.Error("Should have passed")
4040
}
4141

42-
req = NewRequest(nil, nil, nil, nil, opts)
42+
req, _ = NewRequest(nil, nil, nil, nil, opts)
4343
req.SetOption("b", 5)
4444
req.SetOption("B", "test")
4545
res = cmd.Call(req)
4646
if res.Error() != nil {
4747
t.Error("Should have passed")
4848
}
4949

50-
req = NewRequest(nil, nil, nil, nil, opts)
50+
req, _ = NewRequest(nil, nil, nil, nil, opts)
5151
req.SetOption("foo", 5)
5252
res = cmd.Call(req)
5353
if res.Error() != nil {
5454
t.Error("Should have passed")
5555
}
5656

57-
req = NewRequest(nil, nil, nil, nil, opts)
57+
req, _ = NewRequest(nil, nil, nil, nil, opts)
5858
req.SetOption(EncShort, "json")
5959
res = cmd.Call(req)
6060
if res.Error() != nil {
6161
t.Error("Should have passed")
6262
}
6363

64-
req = NewRequest(nil, nil, nil, nil, opts)
64+
req, _ = NewRequest(nil, nil, nil, nil, opts)
6565
req.SetOption("b", "100")
6666
res = cmd.Call(req)
6767
if res.Error() != nil {
6868
t.Error("Should have passed")
6969
}
7070

71-
req = NewRequest(nil, nil, nil, nil, opts)
71+
req, _ = NewRequest(nil, nil, nil, nil, opts)
7272
req.SetOption("b", ":)")
7373
res = cmd.Call(req)
7474
if res.Error() == nil {

response_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ func TestMarshalling(t *testing.T) {
1515
cmd := &Command{}
1616
opts, _ := cmd.GetOptions(nil)
1717

18-
req := NewRequest(nil, nil, nil, nil, opts)
18+
req, _ := NewRequest(nil, nil, nil, nil, opts)
1919

2020
res := NewResponse(req)
2121
res.SetOutput(TestOutput{"beep", "boop", 1337})

0 commit comments

Comments
 (0)