dove-core 0.1.1

The shared library behind dove — client-side-encrypted, expiring file sharing from a cloud you own.
Documentation
use dove_core::config::{Backend, Registry};
use dove_core::resolve;

#[test]
fn unknown_kind_without_plugin_is_legible() {
    // ensure the plugins dir has no dove-cloud (use DOVE_PLUGINS pointed at an empty temp dir)
    let empty = std::env::temp_dir().join(format!("dove-plugins-empty-{}", std::process::id()));
    std::fs::create_dir_all(&empty).unwrap();
    std::env::set_var("DOVE_PLUGINS", &empty);
    let reg = Registry {
        active: "cloud".into(),
        backends: vec![Backend {
            name: "cloud".into(),
            kind: "cloud".into(),
            config: Default::default(),
        }],
    };
    let err = resolve(&reg)
        .err()
        .expect("expected a missing-plugin error")
        .to_string();
    assert!(err.contains("dove install cloud"), "got: {err}");
    std::env::remove_var("DOVE_PLUGINS");
    let _ = std::fs::remove_dir_all(&empty);
}