Skip to content

CLI tests red on main: stale init/help expectations (supabase default, expanded description, non-TTY iceberg) #24

Description

@ihistand

Found while doing #18 (typed-yargs refactor). These failures reproduce on pristine main (verified by git stash + run), so they're pre-existing test rot, not regressions. Three //cli:* targets are red:

1. //cli:index_init_test — "workflow_settings.yaml generated from init"

Expects a BigQuery project but init now defaults to supabase:

expected 'sqlanvilCoreVersion: 1.3.0\nwarehouse: supabase\ndefaultDataset: sqlanvil\n…'
to equal  'sqlanvilCoreVersion: 1.3.0\ndefaultProject: sqlanvil-database\ndefaultLocation: us-central1\ndefaultDataset: sqlanvil\n…'

warehouseOption default was changed to "supabase"; the test was never updated. Fix: pass --warehouse bigquery in the test (or update the expected YAML to the supabase shape, and/or add a supabase-default case).

2. //cli:index_init_test — iceberg init cases (5 failures)

AssertionError: expected null to deeply equal { bucketName, tableFolderRoot, … }. promptForIcebergConfig() returns null under the non-TTY test runner, so the iceberg config never materializes. Fix: stub/inject the iceberg prompt, or gate these on an interactive harness.

3. //cli:index_help_test — "shows help for 'init' command"

Stale expected description:

expected help text to include 'Create a new sqlanvil project.'
actual description: 'Create a new sqlanvil project (BigQuery, Postgres, or Supabase).'

Fix: update the expected substring.

4. //cli:index_compile_test — "disable-assertions flag (compilation)" (needs triage)

Failed in a --jobs=2 run with a Bazel-sandbox tmp-dir error (tmp_dir_N does not appear to be a sqlanvil directory, unexpected; remove it) — smells like a sandbox/npm install race under parallelism rather than a logic failure. Confirm whether it's flaky (re-run with --jobs=1/--runs_per_test) or a real stale expectation before fixing.

Why it matters

//cli:... is partly red, which masks real regressions (it nearly masked the verification for #18 — had to diff before/after to prove no new breakage). Worth getting the CLI suite green so it's a trustworthy signal again.

Metadata

Metadata

Assignees

No one assigned

    Labels

    qaTesting / acceptance / verificationtech-debtCode TODOs / cleanup / polish

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions