Skip to content

Commit

Permalink
added domain for the cookie
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremy Facchetti committed Jul 7, 2023
1 parent 6ac8749 commit 7108d45
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/e2e/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import (
"os"
"path/filepath"
"regexp"
"strconv"
"strings"
"time"

. "github.com/onsi/ginkgo/v2"
Expand Down Expand Up @@ -239,11 +241,15 @@ func adminPortalSessionSetup() (string, *selenium.WebDriver) {
Password []byte
Groups string
}
domain := strings.TrimPrefix(host, "https://")
domain = strings.TrimSuffix(domain, ":"+strconv.Itoa(hostPort))

userInfo, err := json.Marshal(userinfo{"test", sessionKey, elevatedGroups})

Check failure on line 247 in test/e2e/setup.go

View workflow job for this annotation

GitHub Actions / golangci-lint

SA4006: this value of `err` is never used (staticcheck)
cookieUser := &selenium.Cookie{
Name: middleware.IntUsernameKey,
Value: string(userInfo),
Expiry: math.MaxUint32,
Domain: domain,
}

// if err := wd.AddCookie(cookieGroup); err != nil {
Expand Down

0 comments on commit 7108d45

Please sign in to comment.