SophieTech88 commented on PR #917:
URL: https://github.com/apache/yunikorn-core/pull/917#issuecomment-2229965527

   Finally find, this commit can't pass the unit test, because the 
`TestSpecificGroupResourceUsage` failed.  
   
   And the error message is 
`YUNIKORN/yunikorn-core/pkg/webservice/handlers_test.go:1785: assertion failed: 
404 (http.StatusNotFound int) != 400 (resp.statusCode int): Incorrect Status 
code`. 
   
   Then dig into it, find in TestSpecificGroupResourceUsage, there is a test 
case as below:
   
   ``// Test group name with special characters escaped properly
        validGroup := url.QueryEscape("test_a-b_c@#d@do:mai/n.com")
        req, err = createRequest(t, "/ws/v1/partition/default/usage/group", 
map[string]string{"user": "testuser", "group": validGroup})
        assert.NilError(t, err)
        resp = &MockResponseWriter{}
        getGroupResourceUsage(resp, req)
        assertGroupNotExists(t, resp)
   ```
   this group name `test_a-b_c@#d@do:mai/n.com` can't pass the InvalidGroupName 
test, so it returns 400 bad request error, which is different with the 
GroupNotExists error 404.
   


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