[GH-ISSUE #246] Improving test coverage of parts of the API used by Terraform #52

Closed
opened 2026-02-28 00:40:22 +03:00 by kerem · 4 comments
Owner

Originally created by @rf152 on GitHub (Mar 20, 2023).
Original GitHub issue: https://github.com/Telmate/proxmox-api-go/issues/246

I figured it's worth having an issue to capture the progress of the tests written

General Access

  • User/Password authentication
  • User/Api Token authentication

Qemu VM

  • Create
  • Read
  • Update
  • Delete
  • Cloud-init

LXC Container

  • Create
  • Read
  • Update
  • Delete

Pool

  • Create
  • Read
  • Update
  • Delete
Originally created by @rf152 on GitHub (Mar 20, 2023). Original GitHub issue: https://github.com/Telmate/proxmox-api-go/issues/246 I figured it's worth having an issue to capture the progress of the tests written ## General Access - [x] User/Password authentication - [x] User/Api Token authentication ## Qemu VM - [x] Create - [x] Read - [x] Update - [x] Delete - [x] Cloud-init ## LXC Container - [x] Create - [x] Read - [x] Update - [x] Delete ## Pool - [x] Create - [x] Read - [x] Update - [x] Delete
kerem closed this issue 2026-02-28 00:40:22 +03:00
Author
Owner

@rf152 commented on GitHub (Mar 21, 2023):

PR #245 Contains a fair number of tests.

I've also got a branch that I'm currently writing that adds the ability to interact with API tokens (although not their permissions at the moment), which opens up the ability to test the login with API tokens.

As to the LXC containers I've hit a bit of a wall because there is currently no method for importing / downloading templates via the go api, so that needs writing first. I'm hesitant to write the function before the layout has been fully planned (currently being discussed in #210), so I'm at a bit of an impasse.

One option may be to write a quick and dirty hack to get a template downloaded so that I can write tests for the LXC stuff, which should then get us most of the coverage for testing the parts that are used by the Terraform API

<!-- gh-comment-id:1478686222 --> @rf152 commented on GitHub (Mar 21, 2023): PR #245 Contains a fair number of tests. I've also got a branch that I'm currently writing that adds the ability to interact with API tokens (although not their permissions at the moment), which opens up the ability to test the login with API tokens. As to the LXC containers I've hit a bit of a wall because there is currently no method for importing / downloading templates via the go api, so that needs writing first. I'm hesitant to write the function before the layout has been fully planned (currently being discussed in #210), so I'm at a bit of an impasse. One option may be to write a quick and dirty hack to get a template downloaded so that I can write tests for the LXC stuff, which should then get us most of the coverage for testing the parts that are used by the Terraform API
Author
Owner

@mleone87 commented on GitHub (Mar 28, 2023):

nice! feel free to notify me when it's ready to merge!

<!-- gh-comment-id:1487644821 --> @mleone87 commented on GitHub (Mar 28, 2023): nice! feel free to notify me when it's ready to merge!
Author
Owner

@rf152 commented on GitHub (Apr 5, 2023):

@mleone87 that's as much as I can do at the moment, until we have a method for importing LXC containers, so I think it makes sense to merge #245, and I'll do another pull request when I've written a hack for importing LXC containers

<!-- gh-comment-id:1498039953 --> @rf152 commented on GitHub (Apr 5, 2023): @mleone87 that's as much as I can do at the moment, until we have a method for importing LXC containers, so I think it makes sense to merge #245, and I'll do another pull request when I've written a hack for importing LXC containers
Author
Owner

@rf152 commented on GitHub (May 5, 2023):

Cloud-init now sorted in #258

Think this puts us in a good position to start refactoring the whole application

<!-- gh-comment-id:1535898257 --> @rf152 commented on GitHub (May 5, 2023): Cloud-init now sorted in #258 Think this puts us in a good position to start refactoring the whole application
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#52
No description provided.