Files
connector-macos/TEST.md
T
David YoungandClaude Opus 5.5 7ea0ce77bb Add PLAN.md, for work to do, and TEST.md, for tests to run
PLAN.md has what the smoketest runs left open; TEST.md says which
scenarios to run when, and what to test by hand on a Mac.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 14:54:29 -07:00

82 lines
4.9 KiB
Markdown

# Tests
What to run, and when. Work still to do is in [PLAN.md](PLAN.md).
## The smoketest
`smoketest/run` runs each scenario in a fresh macOS VM with Tart. How it works, and each scenario, are in [smoketest/README.md](smoketest/README.md). It tests the working copy, including uncommitted changes, except `05-install`, which also installs what's on Gitea.
| When | Run |
|------|-----|
| After changing a file | the scenarios that use it: `smoketest/run 60` or `smoketest/run 50 60` |
| Before pushing | `smoketest/run` (the quick tier: everything but `70-apps`) |
| After pushing | `smoketest/run 05`, which installs the published version |
| Before telling people to update | `smoketest/run --tier all`, which takes about an hour |
| Changed | Scenarios |
|---------|-----------|
| any script (bash 3.2, tools macOS lacks) | `00` |
| `install.sh`, `update` | `05` |
| `configure`, `configure.d/lib/` | `10`, and the scenarios of the items that use the lib |
| `configure.d/lib/json.sh`, `keychain.sh` | `20` |
| `configure.d/10-core.sh`, `lib/profile.sh` | `30` |
| `configure.d/lib/mdns.sh` | `40` |
| `sandbox/`, `configure.d/30-agents.sh`, `50-ai-servers.sh`, `lib/agents.sh` | `50` |
| `configure.d/20-backup.sh`, `system/backup*` | `60` |
| `configure.d/lib/apps.sh` | `70` (with `--tier all`), `85` |
| `configure.d/60-storage.sh`, `lib/smb.sh`, `system/storage-mount` | `80`, `85` |
| `configure.d/lib/sftp.sh` | `85` |
### Expected skips
These are `skip` lines, not failures. Each needs a click in System Settings:
- `30`: installing the profile
- `60`: Full Disk Access for Federated Backup
- `70`: installing Element, Nextcloud and Tailscale, as the vanilla image allows only App Store apps
- `80`: mounting a real SMB share
- `85`: turning on macFUSE's extension, and so mounting over SFTP
### When it goes wrong
- **"Couldn't ssh to the VM ... No route to host":** your terminal app may not be allowed on the local network: System Settings > Privacy & Security > Local Network.
- **A scenario stops making progress:** run it again with `--keep`, ssh in (the run prints how) and look at what's running: `ps -axo pid,etime,command`. Two causes so far:
- A command waiting on a macOS privacy prompt that no one answers. Look for `AUTHREQ_PROMPTING` in tccd's log: `sudo log show --last 10m --predicate 'process == "tccd"' | grep AUTHREQ_PROMPTING`
- A command that never ends and ignores TERM, like `sshfs` with macFUSE's extension off.
- **Leftover VMs**, from a run that was stopped: `tart list`, then `tart stop` and `tart delete` each `connector-smoke-...` one. Each takes about 27 GB.
## By hand, on a Mac
macOS allows these only with a click, so test them on a Mac, or on a VM kept with `--keep`. Start from `configure` unless it says otherwise.
### Core
- [ ] `configure core`, then in System Settings > Profiles choose "Federated Core (...)" and Install. Mail, Calendar and Contacts work against a real Core. `configure core` then says the profile is installed.
- [ ] A Core password with `&`, `<`, `>`, `"` or `'` in it reaches Mail unchanged.
- [ ] Superpanel opens from Applications, with the Core's icon.
- [ ] Nextcloud's sign-in in the browser, then `configure core` notices the account.
### Backup
- [ ] Give Federated Backup Full Disk Access. `configure backup` says it can read all your files, and the next backup (`restic snapshots`, then `restic ls latest`) includes Desktop, Documents and Downloads.
- [ ] Without Full Disk Access, on a Mac with Photos, Calendar, Reminders and Contacts data: a backup finishes with no prompt, and there's a notification about Full Disk Access. If it stalls, find the folder with tccd's log as above, and add it to PLAN.md.
- [ ] Restore a file, as in README.md's "Restoring from a backup".
### Storage
- [ ] Mount a real SMB share: the sign-in window, "Remember this password in my keychain", and whether a server without a share offers a list of shares. It mounts again after logging out and in.
- [ ] Turn on macFUSE's extension (System Settings > General > Login Items & Extensions > File System Extensions) and mount an SFTP folder with `configure storage`. It comes back after sleep.
- [ ] With the extension off, `configure storage` gives up on an SFTP folder within about 30 seconds and says to turn macFUSE on.
- [ ] Note whether `pluginkit -m -A -D -p com.apple.fskit.fsmodule` lists macFUSE (see PLAN.md).
### Apps
- [ ] With "App Store & Known Developers" allowed, `configure` installs Element, Nextcloud and Tailscale.
- [ ] With only "App Store" allowed, it refuses and says this Mac only allows apps from the App Store, not that the app isn't notarized.
- [ ] Tailscale's VPN approval.
### Sandboxed agents
- [ ] A sandboxed agent (e.g. `opencode`, run in a project folder) can run `mktemp` and `mktemp -d`, write in its project, and reach allowed sites. It can't read `~/.ssh` or the keychains, or write elsewhere in your home folder.
- [ ] `configure ai-servers` allows a server on the network, and the agent reaches it. Before that, it can't.