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>
4.9 KiB
4.9 KiB
Tests
What to run, and when. Work still to do is in 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. 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 profile60: Full Disk Access for Federated Backup70: installing Element, Nextcloud and Tailscale, as the vanilla image allows only App Store apps80: mounting a real SMB share85: 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_PROMPTINGin tccd's log:sudo log show --last 10m --predicate 'process == "tccd"' | grep AUTHREQ_PROMPTING - A command that never ends and ignores TERM, like
sshfswith macFUSE's extension off.
- A command waiting on a macOS privacy prompt that no one answers. Look for
- Leftover VMs, from a run that was stopped:
tart list, thentart stopandtart deleteeachconnector-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 corethen 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 corenotices the account.
Backup
- Give Federated Backup Full Disk Access.
configure backupsays it can read all your files, and the next backup (restic snapshots, thenrestic 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 storagegives 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.fsmodulelists macFUSE (see PLAN.md).
Apps
- With "App Store & Known Developers" allowed,
configureinstalls 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 runmktempandmktemp -d, write in its project, and reach allowed sites. It can't read~/.sshor the keychains, or write elsewhere in your home folder. configure ai-serversallows a server on the network, and the agent reaches it. Before that, it can't.