[GH-ISSUE #470] test: authentication_apikey_test.go fails #121

Closed
opened 2026-02-28 00:40:40 +03:00 by kerem · 1 comment
Owner

Originally created by @NemoDacremont on GitHub (Oct 8, 2025).
Original GitHub issue: https://github.com/Telmate/proxmox-api-go/issues/470

Originally assigned to: @Tinyblargon on GitHub.

This test fails with this error :

501 Method 'POST /access/users//token/testing' not implemented

This is because rawUser.Get() fails to create user with fields User.Name and User.Realm. The root cause seems to be rawConfigUser.GetUser expecting to have the json attribute 'userid' in API response, which is false when making request to /access/users/{userid} (requested in this case through clientAPI.getUserConfig).

Response of /access/users/{userid} :

{"data":{"email":"pve@example.com","expire":0,"groups":[],"tokens":{"mytest":{"expire":0,"privsep":0}},"enable":1}}

Response of /access/users :

{"data":[{"enable":1,"realm-type":"pam","email":"pve@example.com","userid":"root@pam","expire":0}]}
Originally created by @NemoDacremont on GitHub (Oct 8, 2025). Original GitHub issue: https://github.com/Telmate/proxmox-api-go/issues/470 Originally assigned to: @Tinyblargon on GitHub. This test fails with this error : ``` 501 Method 'POST /access/users//token/testing' not implemented ``` This is because `rawUser.Get()` fails to create user with fields `User.Name` and `User.Realm`. The root cause seems to be `rawConfigUser.GetUser` expecting to have the json attribute `'userid'` in API response, which is false when making request to `/access/users/{userid}` (requested in this case through `clientAPI.getUserConfig`). Response of `/access/users/{userid}` : ```json {"data":{"email":"pve@example.com","expire":0,"groups":[],"tokens":{"mytest":{"expire":0,"privsep":0}},"enable":1}} ``` Response of `/access/users` : ```json {"data":[{"enable":1,"realm-type":"pam","email":"pve@example.com","userid":"root@pam","expire":0}]} ```
kerem 2026-02-28 00:40:40 +03:00
  • closed this issue
  • added the
    type/bug
    label
Author
Owner

@Tinyblargon commented on GitHub (Oct 8, 2025):

@NemoDacremont Thank you for reporting this issue. I'll get it fixed asap.

<!-- gh-comment-id:3380790779 --> @Tinyblargon commented on GitHub (Oct 8, 2025): @NemoDacremont Thank you for reporting this issue. I'll get it fixed asap.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/proxmox-api-go#121
No description provided.