Commit 02af4b31 authored by zhangxiaoyu-zidif's avatar zhangxiaoyu-zidif

Use t.Fatalf instead

parent 7043372d
...@@ -297,14 +297,12 @@ func TestGenerateService(t *testing.T) { ...@@ -297,14 +297,12 @@ func TestGenerateService(t *testing.T) {
body := objBody(codec, &test.service) body := objBody(codec, &test.service)
data, err := ioutil.ReadAll(req.Body) data, err := ioutil.ReadAll(req.Body)
if err != nil { if err != nil {
t.Errorf("unexpected error: %v", err) t.Fatalf("unexpected error: %v", err)
t.FailNow()
} }
defer req.Body.Close() defer req.Body.Close()
svc := &api.Service{} svc := &api.Service{}
if err := runtime.DecodeInto(codec, data, svc); err != nil { if err := runtime.DecodeInto(codec, data, svc); err != nil {
t.Errorf("unexpected error: %v", err) t.Fatalf("unexpected error: %v", err)
t.FailNow()
} }
// Copy things that are defaulted by the system // Copy things that are defaulted by the system
test.service.Annotations = svc.Annotations test.service.Annotations = svc.Annotations
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment