Skip to content

Commit 7f93b61

Browse files
committed
chore: sync from pve-openapi@f0a6069
feat(sdk-sync): reserve user-test directory + preserve non-managed workflows
1 parent 689fa59 commit 7f93b61

6 files changed

Lines changed: 61 additions & 5 deletions

File tree

clientapi_pve/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
""" # noqa: E501
1515

1616

17-
__version__ = "2026.5.23"
17+
__version__ = "2026.5.24"
1818

1919
# Define package exports
2020
__all__ = [

clientapi_pve/api_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def __init__(
9191
self.default_headers[header_name] = header_value
9292
self.cookie = cookie
9393
# Set default User-Agent.
94-
self.user_agent = 'OpenAPI-Generator/2026.5.23/python'
94+
self.user_agent = 'OpenAPI-Generator/2026.5.24/python'
9595
self.client_side_validation = configuration.client_side_validation
9696

9797
def __enter__(self):

clientapi_pve/configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ def to_debug_report(self) -> str:
574574
"OS: {env}\n"\
575575
"Python Version: {pyversion}\n"\
576576
"Version of the API: 9.x\n"\
577-
"SDK Package Version: 2026.5.23".\
577+
"SDK Package Version: 2026.5.24".\
578578
format(env=sys.platform, pyversion=sys.version)
579579

580580
def get_host_settings(self) -> List[HostSetting]:

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "clientapi_pve"
3-
version = "2026.5.23"
3+
version = "2026.5.24"
44
description = "Proxmox Virtual Environment API"
55
authors = [
66
{name = "OpenAPI Generator Community",email = "team@openapitools.org"},

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# prerequisite: setuptools
2020
# http://pypi.python.org/pypi/setuptools
2121
NAME = "clientapi-pve"
22-
VERSION = "2026.5.23"
22+
VERSION = "2026.5.24"
2323
PYTHON_REQUIRES = ">= 3.10"
2424
REQUIRES = [
2525
"urllib3 >= 2.1.0, < 3.0.0",

tests/e2e/README.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# User-written E2E tests
2+
3+
This directory is reserved for **your** E2E tests against a live
4+
Proxmox VE server. Anything you put here:
5+
6+
* **Survives regeneration.** The generator's orphan-removal step is
7+
driven by `.openapi-generator/FILES` — files outside that manifest
8+
(including this whole directory) are never touched by `sdk-sync`.
9+
* **Survives the workflow wipe.** `sdk-bootstrap` only touches the
10+
workflow files it manages (`ci.yml`, `publish.yml`). User-added
11+
workflows like `.github/workflows/e2e.yml` are preserved verbatim.
12+
13+
The auto-generated SDK code lives outside this directory; treat
14+
everything under `tests/e2e` as your own.
15+
16+
## Quickstart
17+
18+
1. Add fixtures, helpers, and tests under `tests/e2e/`.
19+
2. (Optional) Add `.github/workflows/e2e.yml` to run them in CI against
20+
a Proxmox VE test instance — the sync pipeline preserves
21+
any workflow file whose name isn't in the managed allowlist.
22+
3. The generated `ci.yml` runs the SDK's own build + unit tests; wire
23+
your E2E suite into a separate workflow so it can use its own
24+
secrets / runners / schedule.
25+
26+
## Conventions per language
27+
28+
| Language | User-test path | Runner |
29+
|---|---|---|
30+
| TypeScript | `tests/e2e/*.test.ts` | `vitest run tests/e2e` |
31+
| Python | `tests/e2e/test_*.py` | `pytest tests/e2e` |
32+
| Go | `tests/e2e/*_test.go` (package `e2e_test`) | `go test ./tests/e2e/...` |
33+
| Rust | `tests/e2e/*.rs` | `cargo test --test '*'` |
34+
| PHP | `tests/E2E/*Test.php` | `vendor/bin/phpunit tests/E2E` |
35+
| Kotlin | `src/test/kotlin/e2e/*Test.kt` | `./gradlew test --tests 'e2e.*'` |
36+
37+
> The Kotlin generator's post-process step deletes
38+
> `src/test/kotlin/**/apis/*.kt` and `src/test/kotlin/**/models/*.kt`
39+
> (openapi-generator's stub tests). Keep your tests **outside** those
40+
> two subpaths — the `e2e/` directory recommended above is the
41+
> intended location and is never touched by the pipeline.
42+
43+
## Authenticating against a real server
44+
45+
Use the API-token format documented in the SDK's main README:
46+
47+
* Perl family (PVE, PMG): `<PREFIX>APIToken=USER@REALM!TOKENID=UUID`
48+
* Rust family (PBS, PDM): `<PREFIX>APIToken=USER@REALM!TOKENID:UUID`
49+
50+
Set the secret via env var so tests stay portable:
51+
52+
```sh
53+
PVE_HOST=https://pve.example.com:8006
54+
PVE_TOKEN='PVEAPIToken=root@pam!auto=<your-uuid>'
55+
PVE_INSECURE_TLS=1 # only when targeting a self-signed dev server
56+
```

0 commit comments

Comments
 (0)