Skip to content

chore(tvc): refactor now-unsafe test code#157

Merged
daniilrrr merged 2 commits into
mainfrom
daniil/non-interactive-tests-with-command
Jun 3, 2026
Merged

chore(tvc): refactor now-unsafe test code#157
daniilrrr merged 2 commits into
mainfrom
daniil/non-interactive-tests-with-command

Conversation

@daniilrrr
Copy link
Copy Markdown
Contributor

  • in Rust 2024, std::env::set_var is now unsafe
  • those tests were not strictly necessary and can be done via the cmd approach

- in Rust 2024 `std::env::set_var` is now unsafe
- those tests were not strictly necessary and can be done via the `cmd` approach
@daniilrrr daniilrrr requested review from Copilot and richardpringle and removed request for Copilot June 3, 2026 17:30
- in Rust 2024 `std::env::set_var` is now unsafe
- those tests were not strictly necessary and can be done via the `cmd` approach
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Refactors TVC’s non-interactive-mode tests to avoid std::env::set_var/remove_var now being unsafe under Rust 2024, by moving the relevant coverage to CLI-level (process) tests.

Changes:

  • Added tvc deploy create non-interactive integration tests that assert missing-required-flags behavior and pull-secret placeholder handling.
  • Removed unit tests and the env-mutation guard (NonInteractiveGuard) from deploy/create.rs tests.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
tvc/tests/non_interactive.rs Adds new CLI-driven non-interactive regression tests for deploy create.
tvc/src/commands/deploy/create.rs Removes unit tests that relied on process-wide env mutation (now unsafe in Rust 2024).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

@richardpringle richardpringle left a comment

Choose a reason for hiding this comment

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

🚀

@daniilrrr daniilrrr merged commit 752b660 into main Jun 3, 2026
4 checks passed
@github-actions github-actions Bot mentioned this pull request Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants