mirror of
https://github.com/saphid/frame-control.git
synced 2026-10-06 01:00:18 +02:00
tests/fakeframe: a container that stands in for the Frame (Arch Linux, or Arch Linux ARM on arm64) with sshd, rsync, Valve's steamos-devkit-service and hooks (vendored unmodified), a fake Steam client for the devkit pipe and the DevTools port (the app's JavaScript runs in Node against stand-in SteamClient/appStore objects), stubs for steam, wpctl, flatpak, podman, Lepton and friends, battery and thermal files under /sys, and fault switches (fakeframe-ctl): pairing mode, approve/deny/timeout, Steam not running, headset asleep, sshd off, disk full, runtimes missing. A second container is the computer running Frame Control. tests/e2e: 29 tests driving the real ui/server.py, frame_connect.py and frame_titles.py against it; skipped unless FRAME_E2E=1. scripts/e2e.sh builds, runs and tears down; CI runs it on ubuntu-24.04-arm. tests/smoke + scripts/frame-smoke.sh: the core cases against a real Frame, recorded with its BUILD_ID, cleaning up after itself; --pair to pair a throwaway key. docs/testing.md describes the layers. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
55 lines
1.7 KiB
YAML
55 lines
1.7 KiB
YAML
# The fake Frame and the computer Frame Control runs on, for tests/e2e.
|
|
# scripts/e2e.sh builds the two images, brings this up, runs the tests in
|
|
# `host` and takes it down again.
|
|
name: fakeframe-e2e
|
|
services:
|
|
fakeframe:
|
|
image: fakeframe-frame
|
|
pull_policy: never
|
|
hostname: frame # the Frame's default hostname (docs/ssh.md)
|
|
init: true
|
|
tmpfs:
|
|
# Small, so `fakeframe-ctl disk-full on` can fill it.
|
|
- /home/steamos/devkit-game:size=64m,mode=0755,exec
|
|
volumes:
|
|
- keys:/keys
|
|
# frame_status.py reads the battery and thermal zones from /sys, which is
|
|
# read-only in a container (and docker's AppArmor profile refuses writes
|
|
# under /sys even to a mount there). So each folder is a volume mounted
|
|
# twice: over /sys/class/... for reading, and under /var/lib/fakeframe/sys
|
|
# where the supervisor writes it (fakeframe-ctl battery).
|
|
- power:/sys/class/power_supply
|
|
- power:/var/lib/fakeframe/sys/power_supply
|
|
- thermal:/sys/class/thermal
|
|
- thermal:/var/lib/fakeframe/sys/thermal
|
|
environment:
|
|
FAKEFRAME_PAIRING_MODE: ${FAKEFRAME_PAIRING_MODE:-0}
|
|
healthcheck:
|
|
test: ["CMD", "fakeframe-ctl", "ping"]
|
|
interval: 2s
|
|
timeout: 10s
|
|
retries: 60
|
|
host:
|
|
image: fakeframe-host
|
|
pull_policy: never
|
|
init: true
|
|
depends_on:
|
|
fakeframe:
|
|
condition: service_healthy
|
|
volumes:
|
|
- ../..:/repo:ro
|
|
- keys:/keys:ro
|
|
environment:
|
|
FAKEFRAME_CTL: http://fakeframe:9999
|
|
FAKEFRAME_HOST: fakeframe
|
|
FRAME_E2E: "1"
|
|
healthcheck:
|
|
test: ["CMD", "test", "-f", "/home/tester/.ready"]
|
|
interval: 1s
|
|
timeout: 5s
|
|
retries: 120
|
|
volumes:
|
|
keys:
|
|
power:
|
|
thermal:
|