Commit 6d69f18f authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #46845 from zhangxiaoyu-zidif/change-fatalf

Automatic merge from submit-queue Use t.Fatalf instead **What this PR does / why we need it**: we can use t.Fatalf to take place of t.Errorf + t.FailNow() **Release note**: ```release-note NONE ```
parents 6013d316 02af4b31
......@@ -296,14 +296,12 @@ func TestGenerateService(t *testing.T) {
body := objBody(codec, &test.service)
data, err := ioutil.ReadAll(req.Body)
if err != nil {
t.Errorf("unexpected error: %v", err)
t.FailNow()
t.Fatalf("unexpected error: %v", err)
}
defer req.Body.Close()
svc := &api.Service{}
if err := runtime.DecodeInto(codec, data, svc); err != nil {
t.Errorf("unexpected error: %v", err)
t.FailNow()
t.Fatalf("unexpected error: %v", err)
}
// Copy things that are defaulted by the system
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