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

Open Beginner friendly
#91 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
88/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
electron, node.js, typescript

Research direction

Start with scripts/smoke.mjs and the npm run smoke script it implements. Pass Electron a temporary --user-data-dir so settings and the instance lock are isolated, and add a diagnostic when no SMOKE line is produced. Done means the smoke run no longer reads the real settings or conflicts with an open development instance.

Written by the indexing model from the issue text.

Description

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.

Dominant language
TypeScript
Stars
3
Forks
0
Avg merge
2m
Merged PRs (30d)
59

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from A21-devs/Virtual-Machine-Manager

All issues in A21-devs/Virtual-Machine-Manager

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.