mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-04-28 03:20:11 +00:00
fix: add apiToken to security quick-setup payload
The /api/security/quick-setup endpoint requires username, password, AND apiToken fields. Added a dummy 64-char hex API token for the test.
This commit is contained in:
parent
3af584bb5c
commit
98a6f44cbe
1 changed files with 3 additions and 0 deletions
|
|
@ -102,9 +102,12 @@ func waitForHealth(t *testing.T, client *http.Client, baseURL string, timeout ti
|
|||
|
||||
func setupCredentials(t *testing.T, client *http.Client, baseURL, bootstrapToken, username, password string) {
|
||||
t.Helper()
|
||||
// Generate a dummy API token for tests (64 hex chars)
|
||||
apiToken := "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
|
||||
payload := map[string]interface{}{
|
||||
"username": username,
|
||||
"password": password,
|
||||
"apiToken": apiToken,
|
||||
"setupToken": bootstrapToken,
|
||||
}
|
||||
req, err := http.NewRequest("POST", baseURL+"/api/security/quick-setup", nil)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue