Description
The manifest path resolution and creation logic in the run() function within tests/steps/process_steps.rs is verbose and inline, reducing maintainability. This logic should be extracted into a dedicated helper function for better code organisation.
Current Problem
The current implementation contains approximately 23 lines of inline logic for:
- Resolving absolute vs relative manifest paths
- Creating temporary manifest files when they don't exist
- Persisting the manifest files
- Updating the CLI configuration
Proposed Solution
Extract this logic into a helper function ensure_manifest_exists in the support module that:
- Takes temporary directory path and CLI file path as parameters
- Handles absolute/relative path resolution
- Creates manifest files when missing
- Returns the resolved manifest path
- Allows the main
run() function to be simplified
References
Description
The manifest path resolution and creation logic in the
run()function withintests/steps/process_steps.rsis verbose and inline, reducing maintainability. This logic should be extracted into a dedicated helper function for better code organisation.Current Problem
The current implementation contains approximately 23 lines of inline logic for:
Proposed Solution
Extract this logic into a helper function
ensure_manifest_existsin the support module that:run()function to be simplifiedReferences