Prechádzať zdrojové kódy

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>
Sebastiaan van Stijn 5 rokov pred
rodič
commit
6ff727b13c
1 zmenil súbory, kde vykonal 5 pridanie a 2 odobranie
  1. 5 2
      api/types/filters/parse_test.go

+ 5 - 2
api/types/filters/parse_test.go

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