SophieTech88 commented on code in PR #917:
URL: https://github.com/apache/yunikorn-core/pull/917#discussion_r1685491869


##########
pkg/webservice/handlers_test.go:
##########
@@ -2007,6 +2016,14 @@ func TestSpecificGroupResourceUsage(t *testing.T) {
        assert.Equal(t, http.StatusBadRequest, resp.statusCode, statusCodeError)
        assert.Equal(t, errInfo.Message, "invalid URL escape \"%Zt\"", 
jsonMessageError)
        assert.Equal(t, errInfo.StatusCode, http.StatusBadRequest)
+
+       // Test invalid group name according to GroupRegExp
+       invalidGroupName := "invalid_group@name"
+       req, err = createRequest(t, "/ws/v1/partition/default/usage/group", 
map[string]string{"user": "testuser", "group": invalidGroupName})
+       assert.NilError(t, err)
+       resp = &MockResponseWriter{}
+       getGroupResourceUsage(resp, req)
+       assertInvalidGroupName(t, resp)

Review Comment:
   Many thanks for your suggestion. The test for InvalidGroupName is already 
exist. So I just deleted the new created one. Update the PR.



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