Skip to content

test(integration): [#1419] use explicit config path fixtures - #2189

Merged
josecelano merged 6 commits into
torrust:developfrom
josecelano:1419-use-cli-config-path-for-integration-fixtures
Sep 10, 2026
Merged

test(integration): [#1419] use explicit config path fixtures#2189
josecelano merged 6 commits into
torrust:developfrom
josecelano:1419-use-cli-config-path-for-integration-fixtures

Conversation

@josecelano

Copy link
Copy Markdown
Member

Summary

Migrates the shared main-level integration fixture from process-wide configuration environment mutation to the explicit configuration-file startup API added by #2151.

Changes

  • TrackerApplicationFixture now passes its existing isolated workspace TOML file to app::start_with_explicit_config_toml_path.
  • Removes the fixture's global environment lock, environment restoration guard, and unsafe std::env mutation.
  • Updates tests/AGENTS.md and issue Allow multiple integration tests at the main app level #1419 to distinguish the resolved configuration-injection constraint from the still-deferred process-global lifecycle and shutdown constraints.

Validation

  • All eight current main-level integration targets passed together.
  • Focused tracker Clippy and cargo fmt --check passed.
  • Markdown, spelling, local-link, and whitespace checks passed.
  • Required pre-commit gate passed.

Related to #1419

This PR does not close #1419. Cooperative server shutdown and the post-#1488 fixture review remain tracked there.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The functional change is low-risk and aligns with #2151’s explicit-config startup flow; the only noted follow-up is a minor issue-spec metadata formatting tweak.

Pull request overview

This PR updates the main-level integration-test fixture to start the tracker using the explicit config TOML path entry point added in #2151, eliminating process-wide configuration environment mutation and its associated synchronization guard.

Changes:

  • Switched TrackerApplicationFixture startup to app::start_with_explicit_config_toml_path(...) using the workspace-local config file.
  • Removed the global environment lock and unsafe std::env mutation/restoration guard from the shared integration workspace helper.
  • Updated test documentation and issue #1419 notes to reflect that base-source configuration injection via environment is no longer required for in-process fixtures.
File summaries
File Description
tests/common/workspace.rs Removes process-global env mutation and starts the app using an explicit config TOML path.
tests/AGENTS.md Updates test guidance to reflect explicit-path startup for in-process fixtures.
docs/issues/open/1419-allow-multiple-integration-tests-at-main-app-level/ISSUE.md Updates issue narrative and acceptance-criteria notes to reflect the fixture migration away from env-based base-source injection.
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread docs/issues/open/1419-allow-multiple-integration-tests-at-main-app-level/ISSUE.md Outdated
@codecov

codecov Bot commented Sep 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.97%. Comparing base (afd995f) to head (708cb81).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2189      +/-   ##
===========================================
- Coverage    84.97%   84.97%   -0.01%     
===========================================
  Files          351      351              
  Lines        30211    30208       -3     
  Branches     30211    30208       -3     
===========================================
- Hits         25672    25668       -4     
  Misses        4168     4168              
- Partials       371      372       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@josecelano josecelano self-assigned this Sep 10, 2026
@josecelano
josecelano force-pushed the 1419-use-cli-config-path-for-integration-fixtures branch from 59d1493 to ddb8a60 Compare September 10, 2026 12:52
@josecelano

Copy link
Copy Markdown
Member Author

ACK 708cb81

@josecelano
josecelano merged commit 65a077b into torrust:develop Sep 10, 2026
18 checks passed
josecelano added a commit that referenced this pull request Sep 11, 2026
be65276 docs(review): document PR 2198 Copilot audit (Jose Celano)
6bbbf72 docs(issues): format issue 1419 delivery record (Jose Celano)
f1ef4aa docs(issues): record issue 1419 partial delivery (Jose Celano)

Pull request description:

  ## Summary

  Records PR #2189 as the merged partial fixture-isolation delivery for issue #1419 and corrects the issue lifecycle after it was reopened.

  ## Updates

  - Sets `related-pr: 2189`.
  - Marks the partial-improvement PR completion step done.
  - Records that PR #2189 resolved only base-source environment mutation in the shared fixture.
  - Records the accidental GitHub closure and reopening.
  - Keeps the issue open with the #1488-dependent cooperative-shutdown review and final closure review still pending.

  ## Validation

  - `linter markdown`
  - `linter cspell`
  - `linter lychee`
  - `git diff --check`
  - required pre-commit gate

  Related to #1419

ACKs for top commit:
  josecelano:
    ACK be65276

Tree-SHA512: 4910d16f34b710f149e4bac592a20d101c9cb131a0363f07687c626645a132365236dcb0a8c96c0f4b93eabcbd6ed3b845cc9f8332bc71c23880c9ec9c0c59e5
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.

Allow multiple integration tests at the main app level

2 participants