Skip to content

refactor: Move Provider tests to forge_infra with sequential execution#414

Merged
tusharmath merged 2 commits intomainfrom
drop-provider-tests
Feb 28, 2025
Merged

refactor: Move Provider tests to forge_infra with sequential execution#414
tusharmath merged 2 commits intomainfrom
drop-provider-tests

Conversation

@tusharmath
Copy link
Copy Markdown
Collaborator

PR: Move Provider tests to forge_infra with sequential execution

Description

This PR moves provider-related tests from forge_domain/src/provider.rs to forge_infra/src/env.rs and configures them to run sequentially, which is more appropriate for environment variable testing.

Changes

  • Add serial_test as a dev dependency to forge_infra
  • Move all Environment provider tests to env.rs
  • Add #[serial] attribute to tests to prevent race conditions when modifying environment variables
  • Remove test module from provider.rs

Motivation

The tests were manipulating environment variables but were located in the domain crate. Since forge_infra is responsible for environment interactions, this is a more appropriate location for these tests. Additionally, these tests need to run sequentially to avoid race conditions since they modify shared environment state.

Testing

  • Verified all tests run successfully in their new location with sequential execution
  • Confirmed no tests remain in the original provider.rs file

…ecution

This commit moves all provider-related tests from forge_domain/src/provider.rs
to forge_infra/src/env.rs which is a more appropriate location for environment
variable testing. Also adds the serial_test crate to ensure tests run sequentially
since they modify shared environment variables.

Changes:
- Add serial_test as a dev dependency to forge_infra
- Move all provider tests to env.rs
- Add #[serial] attribute to tests to prevent race conditions
- Remove tests from provider.rs
@tusharmath tusharmath changed the title Move Provider tests to forge_infra with sequential execution refactor: Move Provider tests to forge_infra with sequential execution Feb 28, 2025
@tusharmath tusharmath enabled auto-merge (squash) February 28, 2025 10:18
@github-actions github-actions bot added the type: chore Routine tasks like conversions, reorganization, and maintenance work. label Feb 28, 2025
@tusharmath tusharmath merged commit 23a0c63 into main Feb 28, 2025
9 checks passed
@amitksingh1490 amitksingh1490 deleted the drop-provider-tests branch October 1, 2025 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: chore Routine tasks like conversions, reorganization, and maintenance work.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant