mirror of
https://github.com/Syngnat/GoNavi.git
synced 2026-08-16 03:47:22 +08:00
- 新增无头运行时及连接、查询、导出、批处理、审计和 MCP 命令 - 复用活动数据根、密文存储与跨进程锁,落实写入安全和取消语义 - 增加六平台 CLI 归档、独立校验和、Docker、npm 与 WinGet 分发 - 隔离 GUI/CLI 更新资产并强化 macOS 签名与公证门禁 - 补充并发、审计、事务及发布契约回归测试 Refs #902
24 lines
605 B
Go
24 lines
605 B
Go
package mcpserver
|
|
|
|
import (
|
|
"context"
|
|
"testing"
|
|
)
|
|
|
|
func TestNewAppBackendInitializesWithoutGUI(t *testing.T) {
|
|
t.Setenv("GONAVI_DATA_ROOT", t.TempDir())
|
|
backend, err := NewAppBackend(context.Background())
|
|
if err != nil {
|
|
t.Fatalf("NewAppBackend returned error: %v", err)
|
|
}
|
|
if backend == nil {
|
|
t.Fatal("NewAppBackend returned nil backend")
|
|
}
|
|
if _, err := backend.GetSavedConnections(); err != nil {
|
|
t.Fatalf("headless backend could not read saved connections: %v", err)
|
|
}
|
|
if err := backend.Close(context.Background()); err != nil {
|
|
t.Fatalf("backend.Close returned error: %v", err)
|
|
}
|
|
}
|