mirror of
https://github.com/Telmate/proxmox-api-go.git
synced 2026-04-25 15:35:51 +03:00
[GH-ISSUE #471] misc: about current tests state & more #123
Labels
No labels
good first issue
issue/confirmed
issue/critical
proposal/accepted
pull-request
type/bug
type/enhancement
type/feature
type/question
type/refactoring
type/testing
type/testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/proxmox-api-go#123
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @NemoDacremont on GitHub (Oct 8, 2025).
Original GitHub issue: https://github.com/Telmate/proxmox-api-go/issues/471
I wish to add some features (CT templates and SDNs) to
Telmate/terraform-provider-proxmox, however I figured out there might be some bugs in the SDK to make it happen.In order to submit patches, I wish to add tests to make sure it works and make reviewing easier. To be able to run the tests correctly, I think it's important to be able to run a vm easily like with Vagrant, but the Vagrantfile in the project bootstraps proxmox 7 (and it happened to me to fail to bootstrap), and I believe SDNs appears in proxmox 8.
I've worked recently on NemoDacremont/proxmox-ve that try to support proxmox 8 with vagrant on virtualbox, this is a fork of rgl/proxmox-ve that dropped virtualbox recently.
So now I'm testing on this proxmox base image, and I find out that many tests to fail, by running the following command, I get many fails :
output: https://gist.github.com/NemoDacremont/dfbca89c14bf1420faa78329460677e3 (note that failing Sdn tests are some I started to write but I didn't stash before running the command, and there might be 1 or 2 log.Println around)
I've already opened some issues, and I have some free time ahead of me so I'm going to continue to debug things and try to find root causes, I'll probably try to patch them.
I also would like to update the README, mainly the part about the cli and explain how to use the new one, since it's supposed to be deprecated.
Do you have comments about it @Tinyblargon ? Maybe some things are like they are for a reason.
@Tinyblargon commented on GitHub (Oct 8, 2025):
First off, really appreciate that you want to help out.
Bit of context: over the last 2 years, the upstream Terraform provider had a lot issues, which required my attention. The integration test suits fell behind as i used Terraform to debug.
Please keep in mind that the implementation of a lot of parts hasn't been finalized and are in conflict with the style guide. And therefore subjected to change.
Thank you for reporting the issues. If you are planning on picking them up, please say so in the issue so I can assign it to you. This way, no double work happens.
As for explaining the new CLI in the readme, that would be more than welcome.
If you have any further questions, feel free to ask 😀
@NemoDacremont commented on GitHub (Oct 8, 2025):
Ok perfect, I'll submit some patches and be clearer about picking the issues, I'm glad to help and that it's welcomed
@NemoDacremont commented on GitHub (Oct 8, 2025):
Also, I have a question about making tests reproducible, idk proxmox policy about that but it seems like
alpine-3.17default_20221129_amd64.tar.xzused in lxc test is not downloadable easily on newer proxmox version (or maybe just it isn't available since it's too old).As I'm using my proxmox vagrant image, I'm tempted to bump the template to
alpine-3.21-default_20241217_amd64.tar.xz, but I think it should be linked to a test environment defined in the project so everyone can reproduce the tests. How do you think it should be done ? Should the Vagrantfile be fixed or should the base be changed (ex: using rgl/proxmox-ve)@Tinyblargon commented on GitHub (Oct 8, 2025):
For the CLI tests, we have a file you can customize for your specific environment.
The filename is a misnomer and should have comments.
The API tests should have something like this aswell (currently does not).
The idea of the lxc image is that it's the latest alpine image. The image name changes quite frequently as it's name includes the date/time it was build. Tests that require this image to be there should download it.
Because we support multiple versions of PVE and some versions have interesting behavior, I try to keep a fresh backup of every minor version.
https://github.com/Telmate/proxmox-api-go/blob/master/test%2Fcli%2Fconstants.go
@Tinyblargon commented on GitHub (Oct 8, 2025):
The idea is that you give the test suite
root@pamlogin access. If there are any resources it needs, the tests should download it. If it needs users with specific permissions, it should create them.