Skip to content

Commit

Permalink
feat: Updated test/e2e/e2e.go
Browse files Browse the repository at this point in the history
  • Loading branch information
sweep-ai[bot] authored Feb 1, 2024
1 parent 6fb1797 commit 3aae2c5
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions test/e2e/e2e.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"})
Expand All @@ -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"})

Check failure on line 61 in test/e2e/e2e.go

View workflow job for this annotation

GitHub Actions / lint

expected declaration, found _ (typecheck)

Check failure on line 61 in test/e2e/e2e.go

View workflow job for this annotation

GitHub Actions / Test with go 1.20 on ubuntu-latest

expected declaration, found _

Check failure on line 61 in test/e2e/e2e.go

View workflow job for this annotation

GitHub Actions / Test with go 1.19 on ubuntu-latest

expected declaration, found _

Check failure on line 61 in test/e2e/e2e.go

View workflow job for this annotation

GitHub Actions / Test with go 1.21 on ubuntu-latest

expected declaration, found _

Check failure on line 61 in test/e2e/e2e.go

View workflow job for this annotation

GitHub Actions / Execute OpenIM script on ubuntu-latest

syntax error: non-declaration statement outside function body

Check failure on line 61 in test/e2e/e2e.go

View workflow job for this annotation

GitHub Actions / Execute OpenIM script on ubuntu-latest

syntax error: non-declaration statement outside function body

Check failure on line 61 in test/e2e/e2e.go

View workflow job for this annotation

GitHub Actions / Execute OpenIM script on ubuntu-latest

syntax error: non-declaration statement outside function body

Check failure on line 61 in test/e2e/e2e.go

View workflow job for this annotation

GitHub Actions / Execute OpenIM script on ubuntu-latest

syntax error: non-declaration statement outside function body

// 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)
}

0 comments on commit 3aae2c5

Please sign in to comment.