[PR #245] [MERGED] Direct api testing #336

Closed
opened 2026-02-28 00:41:48 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Telmate/proxmox-api-go/pull/245
Author: @rf152
Created: 3/20/2023
Status: Merged
Merged: 4/11/2023
Merged by: @mleone87

Base: masterHead: direct-api-testing


📝 Commits (10+)

  • ea32962 Started on API testing
  • 4bc42b9 Acme account testing
  • 8ece169 Removed unused environment variables
  • fda075c User management test movearound
  • ad16ae2 Qemu VM tests
  • 6170249 Moved some tests around to standardise naming
  • 024f491 Created Pool tests
  • ff34771 Renamed qemu_clone.go to qemu_clone_test.go, as it should have been
  • bf4101f Added Api Token create/update/delete
  • 362c4c4 Added tests for the API keys

📊 Changes

18 files changed (+730 additions, -0 deletions)

View changed files

📝 Vagrantfile (+6 -0)
📝 proxmox/config_user.go (+80 -0)
test/api/AcmeAccount/acme_account_create_remove_test.go (+57 -0)
test/api/AcmeAccount/acme_account_list_test.go (+14 -0)
test/api/Authentication/authentication_apikey_test.go (+29 -0)
test/api/Authentication/authentication_test.go (+38 -0)
test/api/Connection/connection_test.go (+24 -0)
test/api/Pool/pool_create_destroy_test.go (+34 -0)
test/api/Pool/pool_list_test.go (+16 -0)
test/api/Qemu/qemu_clone_test.go (+52 -0)
test/api/Qemu/qemu_create_update_delete_test.go (+56 -0)
test/api/Qemu/qemu_start_test.go (+38 -0)
test/api/Qemu/shared_test.go (+52 -0)
test/api/Test.go (+58 -0)
test/api/UserManagement/create_token_test.go (+81 -0)
test/api/UserManagement/list_user_test.go (+18 -0)
test/api/UserManagement/user_management_test.go (+66 -0)
test/api/preparations.go (+11 -0)

📄 Description

Implemented a set of tests that test the API itself.

This is aimed to provide a good testbed for making changes without breaking the Terraform plugin, so at the moment it is primarily aimed at testing the parts of the Api that the Terraform plugin uses.

At the moment I have included tests for:

  • Listing users
  • Adding and removing users
  • Authenticating against the API using username/password
  • Testing connection both with and without certificate validation
  • Testing of creating, listing, updating, and deleting Qemu VMs
  • Testing of starting up Qemu VMs

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Telmate/proxmox-api-go/pull/245 **Author:** [@rf152](https://github.com/rf152) **Created:** 3/20/2023 **Status:** ✅ Merged **Merged:** 4/11/2023 **Merged by:** [@mleone87](https://github.com/mleone87) **Base:** `master` ← **Head:** `direct-api-testing` --- ### 📝 Commits (10+) - [`ea32962`](https://github.com/Telmate/proxmox-api-go/commit/ea32962ede0f3a10f2fbc70c411581d69cb8d3e8) Started on API testing - [`4bc42b9`](https://github.com/Telmate/proxmox-api-go/commit/4bc42b99820165c0872723d336c5a73dad0af2bc) Acme account testing - [`8ece169`](https://github.com/Telmate/proxmox-api-go/commit/8ece1697f582625d8b6f9b5fe5e98cdcafb5a242) Removed unused environment variables - [`fda075c`](https://github.com/Telmate/proxmox-api-go/commit/fda075cd72e18f558a9b470d32aad01f92bf9a89) User management test movearound - [`ad16ae2`](https://github.com/Telmate/proxmox-api-go/commit/ad16ae23ec6de1313f5b1575cd8b905ef9375e1b) Qemu VM tests - [`6170249`](https://github.com/Telmate/proxmox-api-go/commit/6170249a0d78eaece413a90accbbe852dfe74063) Moved some tests around to standardise naming - [`024f491`](https://github.com/Telmate/proxmox-api-go/commit/024f491d362c18ce21f990d74b4b02824f42b885) Created Pool tests - [`ff34771`](https://github.com/Telmate/proxmox-api-go/commit/ff3477116a71969152b0ce4dde54ac66643c3638) Renamed qemu_clone.go to qemu_clone_test.go, as it should have been - [`bf4101f`](https://github.com/Telmate/proxmox-api-go/commit/bf4101fb0834edbf3581e9811cd708ac78f64c54) Added Api Token create/update/delete - [`362c4c4`](https://github.com/Telmate/proxmox-api-go/commit/362c4c456d299abee7211c0bf9ede7e2bb62282d) Added tests for the API keys ### 📊 Changes **18 files changed** (+730 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `Vagrantfile` (+6 -0) 📝 `proxmox/config_user.go` (+80 -0) ➕ `test/api/AcmeAccount/acme_account_create_remove_test.go` (+57 -0) ➕ `test/api/AcmeAccount/acme_account_list_test.go` (+14 -0) ➕ `test/api/Authentication/authentication_apikey_test.go` (+29 -0) ➕ `test/api/Authentication/authentication_test.go` (+38 -0) ➕ `test/api/Connection/connection_test.go` (+24 -0) ➕ `test/api/Pool/pool_create_destroy_test.go` (+34 -0) ➕ `test/api/Pool/pool_list_test.go` (+16 -0) ➕ `test/api/Qemu/qemu_clone_test.go` (+52 -0) ➕ `test/api/Qemu/qemu_create_update_delete_test.go` (+56 -0) ➕ `test/api/Qemu/qemu_start_test.go` (+38 -0) ➕ `test/api/Qemu/shared_test.go` (+52 -0) ➕ `test/api/Test.go` (+58 -0) ➕ `test/api/UserManagement/create_token_test.go` (+81 -0) ➕ `test/api/UserManagement/list_user_test.go` (+18 -0) ➕ `test/api/UserManagement/user_management_test.go` (+66 -0) ➕ `test/api/preparations.go` (+11 -0) </details> ### 📄 Description Implemented a set of tests that test the API itself. This is aimed to provide a good testbed for making changes without breaking the Terraform plugin, so at the moment it is primarily aimed at testing the parts of the Api that the Terraform plugin uses. At the moment I have included tests for: - Listing users - Adding and removing users - Authenticating against the API using username/password - Testing connection both with and without certificate validation - Testing of creating, listing, updating, and deleting Qemu VMs - Testing of starting up Qemu VMs --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-28 00:41:48 +03:00
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#336
No description provided.