mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-12-02 18:34:29 +08:00
feat: Updated test/e2e/e2e.go
This commit is contained in:
parent
6fb1797576
commit
3aae2c5d1d
@ -28,8 +28,16 @@ import (
|
||||
// This function is called on each Ginkgo node in parallel mode.
|
||||
func RunE2ETests(t *testing.T) {
|
||||
|
||||
// Example usage of new functions
|
||||
token, _ := gettoken.GetUserToken("openIM123456")
|
||||
// Set headers for operationID and token
|
||||
operationID := "e2e-test-operation-id"
|
||||
token, err := gettoken.GetUserToken("openIM123456")
|
||||
if err != nil {
|
||||
t.Fatalf("Failed to get user token: %v", err)
|
||||
}
|
||||
headers := map[string]string{
|
||||
"token": token,
|
||||
"operationID": operationID,
|
||||
}
|
||||
|
||||
// Example of getting user info
|
||||
_ = user.GetUsersInfo(token, []string{"user1", "user2"})
|
||||
@ -49,3 +57,15 @@ func RunE2ETests(t *testing.T) {
|
||||
// Example of getting users
|
||||
_ = user.GetUsers(token, 1, 100)
|
||||
}
|
||||
// Example of getting users' online status
|
||||
_ = user.GetUsersOnlineStatus(token, []string{"user1", "user2"})
|
||||
|
||||
// Example of forcing a logout
|
||||
_ = user.ForceLogout(token, "4950983283", 2)
|
||||
|
||||
// Example of checking user account
|
||||
_ = user.CheckUserAccount(token, []string{"openIM123456", "anotherUserID"})
|
||||
|
||||
// Example of getting users
|
||||
_ = user.GetUsers(token, 1, 100)
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user