You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@yunikorn.apache.org by GitBox <gi...@apache.org> on 2022/12/05 14:16:31 UTC

[GitHub] [yunikorn-core] pbacsko commented on a diff in pull request #465: [YUNIKORN-1439] expose user and group endpoints

pbacsko commented on code in PR #465:
URL: https://github.com/apache/yunikorn-core/pull/465#discussion_r1039656090


##########
pkg/scheduler/ugm/manager_test.go:
##########
@@ -73,6 +73,8 @@ func TestAddRemoveUserAndGroups(t *testing.T) {
 	assert.Equal(t, false, manager.isUserRemovable(userTracker))
 	assert.Equal(t, false, manager.isGroupRemovable(groupTracker))
 	assertUGM(t, user, usage1, 1)
+	assert.Equal(t, user.User, manager.GetUserResourcesByUserName(user.User).userName, "userTracker for user: "+user.User+" should not be nil")
+	assert.Equal(t, user.Groups[0], manager.GetGroupResourcesByGroupName(user.Groups[0]).groupName, "groupTracker for group: "+user.Groups[0]+" should not be nil")

Review Comment:
   The error message will be incorrect, it will be sth like "userTracker for user: nil should not be nil". I don't think the message parameter is even necessary, the testing library generates a readable error message. 



-- 
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: reviews-unsubscribe@yunikorn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org