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:
Sebastiaan van Stijn 2019-08-28 17:37:34 +02:00
parent 3926b5f09d
commit 6ff727b13c
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C

View file

@ -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 {