Skip to content

Remove two tests that could not fail and tighten a third - #4747

Merged
max-sixty merged 1 commit into
mainfrom
nightly/clean-42573705516-tests
Nov 9, 2026
Merged

max-sixty merged 1 commit into
mainfrom
nightly/clean-42573705516-tests

Conversation

@worktrunk-bot

Copy link
Copy Markdown
Collaborator

Removes two integration tests that couldn't fail and tightens a third so its assertion can.

  • test_promote_swap_ignores_require_include (removed): it set --config-set step.copy-ignored.require-include=true, but that config key doesn't exist. feat(step): add require-include option + CLI flags to copy-ignored #3196's commit message describes a config setting, but the merged diff only added the --require-include flag (CopyIgnoredConfig has just exclude), and handle_promote never reads copy-ignored config at all. The test only showed that an unknown --config-set key doesn't break promote.
  • test_switch_with_skip_prompt_flag (removed): it runs through .output(), so there is no TTY, and prompt_shell_integration never prompts without one regardless of skip-shell-integration-prompt. The flag's real effect is covered by the PTY test test_no_prompt_after_first_prompt.
  • test_switch_with_active_shell_integration_no_prompt (tightened): it asserted "Install shell integration" was absent, which is true of any non-TTY run. It now asserts the wt config shell install hint is absent. A non-TTY switch without the CD file prints that hint (test_switch_non_tty_shows_hint), so the assertion now fails if active integration stops suppressing the hint.

A comment in test_promote_stale_staging_blocks_with_guidance also said the ignored files were needed "so stage_ignored is actually called". That's wrong: check_leftover_staging bails before ignored-file discovery.

cargo test --test integration -- shell_integration_prompt step_promote: 44 passed locally.

- test_promote_swap_ignores_require_include passed
  `--config-set step.copy-ignored.require-include=true`, but that config
  key never landed (#3196 shipped only the `--require-include` flag),
  and handle_promote never reads copy-ignored config. It only proved an
  unknown --config-set key doesn't break promote.
- test_switch_with_skip_prompt_flag ran without a TTY, where
  prompt_shell_integration never prompts whatever the flag says. The
  PTY test test_no_prompt_after_first_prompt covers the flag.
- test_switch_with_active_shell_integration_no_prompt asserted the
  prompt text was absent, which also holds without a TTY regardless.
  It now asserts the `wt config shell install` hint is absent, which a
  non-TTY switch without the CD file does print.

Also corrects a promote test comment: the leftover-staging check runs
before ignored-file discovery, so stage_ignored is never reached there.
@worktrunk-bot worktrunk-bot added the nightly-cleanup Issues found by nightly code quality sweep label Nov 9, 2026

@worktrunk-bot worktrunk-bot left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only red check, affected tests (macos, advisory), comes from test_remove_ctrl_c_caught_by_hook_stops_batch::case_1_exit_130 hanging after SIGINT (wt did not finish). This PR only changes tests in other files, so it does not cause that failure. It is tracked as a flake in #4748.

@max-sixty
max-sixty merged commit 72f9142 into main Nov 9, 2026
40 of 50 checks passed
@max-sixty
max-sixty deleted the nightly/clean-42573705516-tests branch November 9, 2026 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

nightly-cleanup Issues found by nightly code quality sweep

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants