Smoke test isn't isolated from the real settings and the running app

未关闭 适合新手
#91 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
88/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
electron, node.js, typescript

调研方向

从 scripts/smoke.mjs 和它实现的 npm run smoke 脚本开始。为 Electron 传入一个临时 --user-data-dir,以隔离设置和实例锁,并在未生成 SMOKE 行时添加诊断信息。完成的标准是 smoke 运行不再读取真实设置,也不再与已打开的开发实例发生冲突。

由索引模型根据 Issue 内容生成。

描述

ci tests

npm run smoke gives Electron a temp VMM_DATA_ROOT, but the app still uses its normal userData folder:

  • It reads the real settings.json, so a QEMU path set in Settings on the dev machine is what the smoke test sees. Harmless today since nothing is written, but the run isn't what CI sees.
  • Since #87 the app takes a single instance lock. If the app (same name, so a dev build) is already open, the smoke run is the second instance, quits with code 0 and prints nothing. The script then fails with an empty line, which doesn't say why.

Passing --user-data-dir=<temp folder> to Electron from scripts/smoke.mjs should fix both: separate settings and a separate lock. The script could also say "no SMOKE line, is the app already running?" when the output is empty.

主要语言
TypeScript
星标
3
派生
0
平均合并
2 分钟
30 天内合并 PR
41

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

A21-devs/Virtual-Machine-Manager 的其他 Issue

查看 A21-devs/Virtual-Machine-Manager 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。