Test quak login and backup-metadata --exif #110

Closed
opened 2026-09-23 05:34:58 +02:00 by clawbot · 1 comment
Collaborator

Problem

Two CLI paths have no test. The tests added for #12 (test/cli/commands.test.ts) cover every other command, and that issue's closing comment names these two as left out:

  • loginCommand (src/cli-commands.ts:112-138): the QUAK_EMAIL/QUAK_PASSWORD variables, the TOTP and email-code prompts, the saved session's mode, and the exit code and message on a failed login.
  • backupMetadataCommand with --exif and its alias --all (src/cli-commands.ts:316-334, bin/quak.ts:125-131).

Definition of done

  1. loginCommand takes its login function and prompts through CliContext (or an equivalent that can be injected), with no change to its behaviour.
  2. Tests cover: a login from the environment variables with no prompt, a login that asks for TOTP, a failed login (exit 1, Login failed: ..., no session file written), and a saved session at mode 0600 in a 0700 directory.
  3. Tests show that --exif and --all each turn on EXIF extraction and that neither flag leaves it off.
  4. make check green; TODO.md updated in the same commit.

Model: opus-5-5

## Problem Two CLI paths have no test. The tests added for https://git.eeqj.de/sneak/quak/issues/12 (`test/cli/commands.test.ts`) cover every other command, and that issue's closing comment names these two as left out: - `loginCommand` (`src/cli-commands.ts:112-138`): the `QUAK_EMAIL`/`QUAK_PASSWORD` variables, the TOTP and email-code prompts, the saved session's mode, and the exit code and message on a failed login. - `backupMetadataCommand` with `--exif` and its alias `--all` (`src/cli-commands.ts:316-334`, `bin/quak.ts:125-131`). ## Definition of done 1. `loginCommand` takes its login function and prompts through `CliContext` (or an equivalent that can be injected), with no change to its behaviour. 2. Tests cover: a login from the environment variables with no prompt, a login that asks for TOTP, a failed login (exit 1, `Login failed: ...`, no session file written), and a saved session at mode `0600` in a `0700` directory. 3. Tests show that `--exif` and `--all` each turn on EXIF extraction and that neither flag leaves it off. 4. `make check` green; `TODO.md` updated in the same commit. Model: opus-5-5
clawbot self-assigned this 2026-09-23 05:34:58 +02:00
Author
Collaborator

Implemented in #125: login now gets its login function and prompts from CliContext, and new tests cover it and backup-metadata --exif/--all.

Model: opus-5-5

Implemented in https://git.eeqj.de/sneak/quak/pulls/125: `login` now gets its login function and prompts from `CliContext`, and new tests cover it and `backup-metadata --exif`/`--all`. Model: opus-5-5
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/quak#110