What We’re Testing
QuickZTNA clients report their version on every heartbeat. The backend compares it against the client_versions table and signals when an update is available. The flow:
- Version reporting: Each heartbeat includes the
versionfield (e.g.,3.2.8), stored on the machine record - Version check API:
POST /api/client-versionwithaction: "check"— compares current vs latest, returns download URL - CLI command:
ztna versionshows the installed version;ztna update --checkqueries the backend for updates - Heartbeat response: Includes
update_available: true/falsebased on semver comparison - Dashboard: Machine detail page shows the version in the Attributes card (
node:clientVersion)
From cmd_version.go:
- Output:
ztna version VERSION (built BUILDTIME, GOOS/GOARCH)
From cmd_update.go:
- Flags:
--check(check only),--json,--yes(skip prompt) - Version comparison: strips
vprefix, splits on., compares numerically
From client-version.ts:
- Uses Valkey cache:
latest-version:{platform}:{arch}(TTL: 86400s) - DB table:
client_versionswithis_latestflag per platform/arch
Your Test Setup
| Machine | Role |
|---|---|
| ⊞ Win-A | Dashboard + API verification |
| 🐧 Linux-C | CLI version and update commands |
ST1 — Check Installed Version
What it verifies: ztna version displays the installed client version with build metadata.
Steps:
- On 🐧 Linux-C :
ztna version
Expected output:
ztna version 3.2.8 (built 2026-03-13T10:30:00Z, linux/amd64)
- On ⊞ Win-A :
ztna version
Expected output:
ztna version 3.2.8 (built 2026-03-13T10:30:00Z, windows/amd64)
Pass: Version string includes version number, build timestamp, and OS/architecture. Both machines should show the same version number if updated together.
Fail / Common issues:
- Shows
devor0.0.0— the binary was built without-ldflagsversion injection. This happens with debug builds.
ST2 — Check for Updates via CLI
What it verifies: ztna update --check queries the backend and reports whether an update is available.
Steps:
- On 🐧 Linux-C :
ztna update --check
Expected output (up to date):
Current version: 3.2.8
Latest version: 3.2.8
You are up to date.
Expected output (update available):
Current version: 3.2.7
Latest version: 3.2.8
A new version is available!
Release notes:
Fixed bug X, added feature Y
Download: https://login.quickztna.com/api/releases/v3.2.8/quickztna-linux-amd64.tar.gz
- Check in JSON format:
ztna update --check --json
Expected JSON (up to date):
{
"current_version": "3.2.8",
"latest_version": "3.2.8",
"update_available": false
}
Pass: Version check returns correct current and latest versions. update_available correctly reflects whether an update exists.
Fail / Common issues:
version check failed— network issue reaching the backend. Checkztna statusfor connectivity.- Shows update available when versions match — version comparison strips
vprefix. If one hasv3.2.8and the other3.2.8, they should still match.
ST3 — Version Check via API
What it verifies: POST /api/client-version with action: "check" returns correct version comparison.
Steps:
- On ⊞ Win-A :
curl -s -X POST https://login.quickztna.com/api/client-version \
-H "Content-Type: application/json" \
-d '{"action":"check","current_version":"3.2.8","platform":"linux","arch":"amd64"}' | python3 -m json.tool
Expected response:
{
"success": true,
"data": {
"current_version": "3.2.8",
"latest_version": "3.2.8",
"update_available": false,
"published_at": "2026-03-13T10:00:00Z"
}
}
- Test with an old version to trigger update detection:
curl -s -X POST https://login.quickztna.com/api/client-version \
-H "Content-Type: application/json" \
-d '{"action":"check","current_version":"1.0.0","platform":"linux","arch":"amd64"}' | python3 -m json.tool
Expected response:
{
"success": true,
"data": {
"current_version": "1.0.0",
"latest_version": "3.2.8",
"update_available": true,
"download_url": "https://login.quickztna.com/api/releases/v3.2.8/quickztna-linux-amd64.tar.gz",
"checksum_sha256": "abc123...",
"release_notes": "...",
"published_at": "2026-03-13T10:00:00Z"
}
}
- Test missing fields:
curl -s -X POST https://login.quickztna.com/api/client-version \
-H "Content-Type: application/json" \
-d '{"action":"check"}' | python3 -m json.tool
Expected error:
{
"success": false,
"error": {
"code": "MISSING_FIELDS",
"message": "current_version and platform are required"
}
}
Pass: Current version returns update_available: false. Old version returns true with download URL. Missing fields returns proper validation error.
ST4 — Version Badge on Dashboard
What it verifies: The machine detail page shows the client version and signals when an update is available.
Steps:
- On ⊞ Win-A , open
https://login.quickztna.com/machines. - Click on Linux-C to open the detail page.
- Find the Attributes card.
Expected attributes:
node:clientVersion— shows3.2.8(or whatever the installed version is)node:os— showslinux
- Find the Machine Details card.
Expected fields:
- Version:
3.2.8 - OS:
linux(with distro details if available fromos_version_detail)
- If the machine is running an older version, look for an update badge or indicator near the version field.
Pass: Version is displayed in the Attributes card. The version matches what ztna version reports on that machine.
Fail / Common issues:
- Version shows
null— the machine may not have sent a heartbeat with the version field. Wait for the next heartbeat cycle (60 seconds). - Version not updated after upgrade — the version is reported on each heartbeat. After upgrading the CLI binary, restart with
ztna down && ztna up.
ST5 — List Available Versions
What it verifies: The list action returns all published versions for a platform.
Steps:
- On ⊞ Win-A :
curl -s -X POST https://login.quickztna.com/api/client-version \
-H "Content-Type: application/json" \
-d '{"action":"list","platform":"linux"}' | python3 -m json.tool
Expected response:
{
"success": true,
"data": {
"versions": [
{
"version": "3.2.8",
"platform": "linux",
"arch": "amd64",
"download_url": "...",
"release_notes": "...",
"is_latest": true,
"published_at": "2026-03-13T10:00:00Z"
}
]
}
}
- Check Windows versions:
curl -s -X POST https://login.quickztna.com/api/client-version \
-H "Content-Type: application/json" \
-d '{"action":"list","platform":"windows"}' | python3 -m json.tool
Pass: Version list returns published versions sorted by published_at descending (newest first). Exactly one version per platform/arch has is_latest: true. Up to 20 results returned.
Fail / Common issues:
- Empty versions array — no versions published for that platform. Check the
client_versionstable via the admin dashboard. UNKNOWN_ACTION— the action must be exactly"list"(not"list_versions").
Summary
| Sub-test | What it proves | Pass condition |
|---|---|---|
| ST1 | Installed version | ztna version shows version, build time, OS/arch |
| ST2 | CLI update check | ztna update --check reports correct update status |
| ST3 | API version check | Semver comparison works, download URL returned when update available |
| ST4 | Dashboard version badge | Attributes card shows node:clientVersion matching CLI |
| ST5 | Version listing | list action returns published versions with is_latest flag |