drukbox-python-sdk 0.4.0__tar.gz → 0.5.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {drukbox_python_sdk-0.4.0 → drukbox_python_sdk-0.5.0}/PKG-INFO +1 -1
- {drukbox_python_sdk-0.4.0 → drukbox_python_sdk-0.5.0}/pyproject.toml +1 -1
- {drukbox_python_sdk-0.4.0 → drukbox_python_sdk-0.5.0}/src/drukbox_sdk/api.py +4 -2
- {drukbox_python_sdk-0.4.0 → drukbox_python_sdk-0.5.0}/tests/test_api.py +13 -2
- {drukbox_python_sdk-0.4.0 → drukbox_python_sdk-0.5.0}/.github/workflows/on-main-merge.yml +0 -0
- {drukbox_python_sdk-0.4.0 → drukbox_python_sdk-0.5.0}/.github/workflows/on-pull-request.yml +0 -0
- {drukbox_python_sdk-0.4.0 → drukbox_python_sdk-0.5.0}/.github/workflows/release.yml +0 -0
- {drukbox_python_sdk-0.4.0 → drukbox_python_sdk-0.5.0}/.gitignore +0 -0
- {drukbox_python_sdk-0.4.0 → drukbox_python_sdk-0.5.0}/AGENTS.md +0 -0
- {drukbox_python_sdk-0.4.0 → drukbox_python_sdk-0.5.0}/LICENSE +0 -0
- {drukbox_python_sdk-0.4.0 → drukbox_python_sdk-0.5.0}/README.md +0 -0
- {drukbox_python_sdk-0.4.0 → drukbox_python_sdk-0.5.0}/src/drukbox_sdk/__init__.py +0 -0
- {drukbox_python_sdk-0.4.0 → drukbox_python_sdk-0.5.0}/src/drukbox_sdk/exceptions.py +0 -0
- {drukbox_python_sdk-0.4.0 → drukbox_python_sdk-0.5.0}/tests/__init__.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: drukbox-python-sdk
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.5.0
|
|
4
4
|
Summary: Async Python client for Drukbox.
|
|
5
5
|
Project-URL: Homepage, https://github.com/clawhaven/drukbox-python-sdk
|
|
6
6
|
Project-URL: Repository, https://github.com/clawhaven/drukbox-python-sdk
|
|
@@ -198,7 +198,8 @@ class DoctorReport:
|
|
|
198
198
|
|
|
199
199
|
ok: bool
|
|
200
200
|
active_provider: str
|
|
201
|
-
|
|
201
|
+
# Whether the active provider's hosts join the tailnet.
|
|
202
|
+
tailnet: bool
|
|
202
203
|
checks: list[DoctorCheck]
|
|
203
204
|
|
|
204
205
|
|
|
@@ -490,7 +491,8 @@ class SandboxAPI:
|
|
|
490
491
|
return DoctorReport(
|
|
491
492
|
ok=data["ok"],
|
|
492
493
|
active_provider=data["active_provider"],
|
|
493
|
-
|
|
494
|
+
# drukbox before "Join the tailnet per provider" sent tailscale_enabled.
|
|
495
|
+
tailnet=data["tailnet"] if "tailnet" in data else data["tailscale_enabled"],
|
|
494
496
|
checks=[DoctorCheck(**check) for check in data["checks"]],
|
|
495
497
|
)
|
|
496
498
|
|
|
@@ -48,7 +48,7 @@ def _doctor_payload(**overrides: Any) -> dict[str, Any]:
|
|
|
48
48
|
payload: dict[str, Any] = {
|
|
49
49
|
"ok": True,
|
|
50
50
|
"active_provider": "aws",
|
|
51
|
-
"
|
|
51
|
+
"tailnet": True,
|
|
52
52
|
"checks": [
|
|
53
53
|
{
|
|
54
54
|
"name": "db",
|
|
@@ -925,6 +925,17 @@ def test_from_env_strips_trailing_slash_via_constructor(
|
|
|
925
925
|
assert sandbox.base_url == "https://trailing.test"
|
|
926
926
|
|
|
927
927
|
|
|
928
|
+
@respx.mock
|
|
929
|
+
async def test_doctor_reads_tailscale_enabled_from_an_older_drukbox(api: SandboxAPI):
|
|
930
|
+
payload = _doctor_payload()
|
|
931
|
+
payload["tailscale_enabled"] = payload.pop("tailnet")
|
|
932
|
+
respx.get(f"{BASE_URL}/doctor").mock(return_value=httpx.Response(200, json=payload))
|
|
933
|
+
|
|
934
|
+
report = await api.doctor()
|
|
935
|
+
|
|
936
|
+
assert report.tailnet is True
|
|
937
|
+
|
|
938
|
+
|
|
928
939
|
@respx.mock
|
|
929
940
|
async def test_doctor_parses_report_and_checks(api: SandboxAPI):
|
|
930
941
|
route = respx.get(f"{BASE_URL}/doctor").mock(
|
|
@@ -937,7 +948,7 @@ async def test_doctor_parses_report_and_checks(api: SandboxAPI):
|
|
|
937
948
|
assert route.calls.last.request.headers["Authorization"] == "Bearer t-test"
|
|
938
949
|
assert report.ok is True
|
|
939
950
|
assert report.active_provider == "aws"
|
|
940
|
-
assert report.
|
|
951
|
+
assert report.tailnet is True
|
|
941
952
|
assert [check.name for check in report.checks] == ["db", "provider", "tailscale"]
|
|
942
953
|
provider = next(check for check in report.checks if check.name == "provider")
|
|
943
954
|
assert provider.status == "ok"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|