[+] Docker

This commit is contained in:
2026-05-08 06:29:13 +00:00
parent 3c287e04d0
commit 4b9de29fdc
8 changed files with 151 additions and 4 deletions
+37
View File
@@ -219,6 +219,43 @@ fn wizard_starts_existing_config_at_sync_group_menu() {
assert!(!output.contains("Profile/org URL:"));
}
#[test]
fn wizard_can_ask_to_run_full_sync_after_config() {
let config = Config {
sites: Vec::new(),
mirrors: vec![MirrorConfig {
name: "sync-1".to_string(),
endpoints: Vec::new(),
create_missing: true,
visibility: Visibility::Private,
allow_force: false,
conflict_resolution: ConflictResolutionStrategy::Fail,
}],
webhook: None,
};
let mut reader = Cursor::new(b"y\n".as_slice());
let mut output = Vec::new();
let run_full_sync =
prompt_run_full_sync_now_with_io(&config, &mut reader, &mut output).unwrap();
assert!(run_full_sync);
let output = String::from_utf8(output).unwrap();
assert!(output.contains("Run full sync now? [y/N]:"));
}
#[test]
fn wizard_skips_full_sync_prompt_without_sync_groups() {
let mut reader = Cursor::new(b"".as_slice());
let mut output = Vec::new();
let run_full_sync =
prompt_run_full_sync_now_with_io(&Config::default(), &mut reader, &mut output).unwrap();
assert!(!run_full_sync);
assert!(output.is_empty());
}
#[test]
fn wizard_edits_existing_sync_group_from_menu() {
let config = Config {