testhost

command
v1.0.0-rc.39 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2026 License: MIT Imports: 22 Imported by: 0

Documentation

Overview

Command testhost 是手机 App(apps/mobile)互通测试用的主机:真正的 internal/remote 主机端(直连入口与 relay 客户端), App API 换成固定的回应,加一台进程内的 Go relay(relayserver)。地址写进 -info 指定的 JSON 文件,Dart 的 test/interop 读它:

go run ./internal/remote/testhost -info /tmp/testhost.json
PTT_TESTHOST=/tmp/testhost.json flutter test test/interop

控制接口(只监听本机):POST /control/pair?scopes=full|read 开配对窗口并返回链接,GET /control/devices, POST /control/devices/{id}/revoke,POST /control/devices/{id}/scopes?scopes=read|full,GET /control/waits。只在测试与 CI 里用。

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL