gxthrj commented on a change in pull request #613:
URL: 
https://github.com/apache/apisix-ingress-controller/pull/613#discussion_r681391957



##########
File path: pkg/apisix/resource_test.go
##########
@@ -40,7 +40,10 @@ func TestItemUnmarshalJSON(t *testing.T) {
 }
 `
        err = json.Unmarshal([]byte(emptyData), &items)
-       assert.Equal(t, err.Error(), "unexpected non-empty object")
+       assert.True(t,
+               assert.NotNil(t, err) &&

Review comment:
       No need to combine `assert.True` to use, just add `assert.NotNil(t, 
err)` alone.
   
   ```suggestion
                assert.NotNil(t, err)
                assert.Equal(t, err.Error(), "unexpected non-empty object")
                ...
   ```
   
   The other changes are the same.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to