mirror of
https://github.com/juanfont/headscale.git
synced 2026-11-24 22:26:29 +09:00
docs: describe running the Android integration tests
Updates tailscale/tailscale#15660
This commit is contained in:
1 parent
e48c8409f0
commit
9888a7d0f9
2 files changed
+24
-1
No files matched your search
@@ -148,6 +148,26 @@ docker ps --filter "label=hi.run-id=20260409-104215-mdjtzx"
|
||||
The run ID appears at the top of the `hi run` output — copy it from
|
||||
there rather than trying to reconstruct it.
|
||||
|
||||
## Android tests
|
||||
|
||||
`TestAndroid*` (in `integration/android/`) boot the official Tailscale
|
||||
Android app in an emulator. They need an x86_64 Docker host exposing
|
||||
`/dev/kvm` (`hi doctor` warns when it is missing) and skip unless an
|
||||
APK is given:
|
||||
|
||||
```bash
|
||||
export HEADSCALE_INTEGRATION_ANDROID_APK=https://pkgs.tailscale.com/stable/tailscale-android-universal-1.102.4.apk
|
||||
go run ./cmd/hi run "^TestAndroid" --failfast=false
|
||||
```
|
||||
|
||||
The APK may also be an absolute path under the repository.
|
||||
`HEADSCALE_INTEGRATION_ANDROID_UPGRADE_FROM` names an older APK for
|
||||
`TestAndroidUpgrade` to start from; it must share the APK's signing key. The first
|
||||
run builds `Dockerfile.android-integration` (SDK + system image, ~13 GB);
|
||||
set `HEADSCALE_INTEGRATION_ANDROID_IMAGE` to reuse a pre-built one. On
|
||||
UI failures the run saves `android-*-missing-*.png`/`.xml` (screenshot
|
||||
and uiautomator dump) and `android-*.logcat.log` to the artefacts dir.
|
||||
|
||||
## Artefacts
|
||||
|
||||
Every run saves debugging artefacts under `control_logs/{runID}/`:
|
||||
|
||||
@@ -34,7 +34,7 @@ regenerated `test-integration.yaml`.
|
||||
|
||||
## Framework overview
|
||||
|
||||
The integration framework has four layers:
|
||||
The integration framework has these layers:
|
||||
|
||||
- **`scenario.go`** — `Scenario` orchestrates a test environment: a
|
||||
Headscale server, one or more users, and a collection of Tailscale
|
||||
@@ -43,6 +43,9 @@ The integration framework has four layers:
|
||||
server in Docker. Options for config, DB backend, DERP, OIDC, etc.
|
||||
- **`tsic/`** — "Tailscale Integration Container": wraps a single
|
||||
Tailscale client. Options for version, hostname, auth method, etc.
|
||||
- **`androidic/`** — "Android Integration Container": the official
|
||||
Tailscale Android app in an emulator, driven over adb/uiautomator.
|
||||
Tests live in `android/`; see `cmd/hi/README.md` for requirements.
|
||||
- **`dockertestutil/`** — low-level Docker helpers (networks, container
|
||||
lifecycle, `IsRunningInContainer()` detection).
|
||||
|
||||
|
||||
Reference in new issue
Block a user