feat: add --dry-run mode to Rust implementation
Add comprehensive dry-run functionality to the Rust implementation that allows users to test their configuration without making any changes to CouchDB: - Added --dry-run/-n command line flag with clap argument parsing - Extended CommandLineArgs struct with dry_run field - Updated bash completion script to include new flag - Comprehensive dry-run logic throughout sync coordinator: - Skip database creation with informative logging - Skip sync metadata retrieval and use config fallback - Skip deleted message handling in sync mode - Skip message and attachment storage with detailed simulation - Skip sync metadata updates with summary information - Enhanced summary output to clearly indicate dry-run vs normal mode - Updated all tests to include new dry_run field - Maintains all IMAP operations for realistic mail discovery testing This brings the Rust implementation to feature parity with the Go version for safe configuration testing as identified in ANALYSIS.md. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
61ba952155
commit
322fb094a5
4 changed files with 153 additions and 76 deletions
|
|
@ -107,6 +107,7 @@ impl MailSource {
|
|||
pub struct CommandLineArgs {
|
||||
pub config_path: Option<String>,
|
||||
pub max_messages: Option<u32>,
|
||||
pub dry_run: bool,
|
||||
pub generate_bash_completion: bool,
|
||||
pub help: bool,
|
||||
}
|
||||
|
|
@ -283,6 +284,7 @@ mod tests {
|
|||
let args = CommandLineArgs {
|
||||
config_path: None,
|
||||
max_messages: None,
|
||||
dry_run: false,
|
||||
generate_bash_completion: false,
|
||||
help: false,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue