chengxilo commented on code in PR #1916:
URL: https://github.com/apache/iggy/pull/1916#discussion_r2181501936
##########
bdd/go/tests/tcp_test/users_steps.go:
##########
@@ -140,35 +137,32 @@ func itShouldSuccessfullyUpdateUserPermissions(userId
uint32, client iggy.Messag
}
func itShouldBePossibleToLogInWithCredentials(username string, password
string) {
- ms := createConnection()
- userId, err := ms.LogIn(iggcon.LogInRequest{
- Username: username,
- Password: password,
- })
+ ms := createClient()
+ userId, err := ms.LoginUser(username, password)
itShouldNotReturnError(err)
It("should return userId", func() {
Expect(userId).NotTo(BeNil())
})
}
-func itShouldReturnSpecificUser(name string, user iggcon.UserResponse) {
+func itShouldReturnSpecificUser(name string, user iggcon.UserInfo) {
It("should fetch user with name "+name, func() {
Expect(user.Username).To(Equal(name))
})
}
-func itShouldContainSpecificUser(name string, users []*iggcon.UserResponse) {
+func itShouldContainSpecificUser(name string, users []iggcon.UserInfo) {
Review Comment:
In this update, I changed `[]*iggcon.UserResponse` to `[]iggcon.UserInfo`.
Although both are slices, the new version uses value elements instead of
pointers. I made this change because UserInfo is relatively lightweight, and
for consistency—all other functions returning slices use values rather than
pointers.
--
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]