Skip to content

Commit

Permalink
FIXUP Random user token
Browse files Browse the repository at this point in the history
  • Loading branch information
nagos committed Oct 20, 2022
1 parent 8355401 commit 7158b89
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tests/integration/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"hash"
"hash/fnv"
"io"
"math/rand"
"net/http"
"net/http/cookiejar"
"net/http/httptest"
Expand Down Expand Up @@ -258,12 +259,9 @@ func loginUserWithPassword(t testing.TB, userName, password string) *TestSession
return session
}

// token has to be unique this counter take care of
var tokenCounter int64

func getTokenForLoggedInUser(t testing.TB, session *TestSession) string {
t.Helper()
tokenCounter++
tokenCounter := rand.Int()
req := NewRequest(t, "GET", "/user/settings/applications")
resp := session.MakeRequest(t, req, http.StatusOK)
doc := NewHTMLParser(t, resp.Body)
Expand Down

0 comments on commit 7158b89

Please sign in to comment.