TestWalkValues: add missing error-check (errcheck)
``` api/types/filters/parse_test.go:340:14: Error return value of `f.WalkValues` is not checked (errcheck) ``` Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
3926b5f09d
commit
6ff727b13c
1 changed files with 5 additions and 2 deletions
|
@ -337,14 +337,17 @@ func TestWalkValues(t *testing.T) {
|
|||
f.Add("status", "running")
|
||||
f.Add("status", "paused")
|
||||
|
||||
f.WalkValues("status", func(value string) error {
|
||||
err := f.WalkValues("status", func(value string) error {
|
||||
if value != "running" && value != "paused" {
|
||||
t.Fatalf("Unexpected value %s", value)
|
||||
}
|
||||
return nil
|
||||
})
|
||||
if err != nil {
|
||||
t.Fatalf("Expected no error, got %v", err)
|
||||
}
|
||||
|
||||
err := f.WalkValues("status", func(value string) error {
|
||||
err = f.WalkValues("status", func(value string) error {
|
||||
return errors.New("return")
|
||||
})
|
||||
if err == nil {
|
||||
|
|
Loading…
Reference in a new issue