Files
foxhunt/bin/fxt/tests/minimal_keyring_test.rs
jgrusewski 9c3d741a08 refactor: restructure repo — crates/, bin/, testing/ layout
Move 17 library crates into crates/, CLI binary into bin/fxt,
consolidate 10 test crates into testing/, split config crate
from deployment config files.

Root directory reduced from 38+ to ~17 directories.
All Cargo.toml paths and build.rs proto refs updated.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 11:56:00 +01:00

38 lines
1.1 KiB
Rust

//! Minimal keyring test to isolate the issue
// Suppress false-positive unused_crate_dependencies warnings
// dev-dependencies are shared across ALL test targets in the crate
// This test may not use all deps, but they are required by other integration tests
#![allow(unused_crate_dependencies)]
#[tokio::test]
async fn minimal_keyring_test() {
use anyhow::Result;
// Direct keyring usage
let result: Result<()> = tokio::task::spawn_blocking(|| {
let entry =
keyring::Entry::new("test-minimal", "test-user").expect("Failed to create entry");
entry
.set_password("test-password-123")
.expect("Failed to set password");
println!("Password set successfully");
let retrieved = entry.get_password().expect("Failed to get password");
println!("Retrieved: {}", retrieved);
assert_eq!(retrieved, "test-password-123");
// Cleanup
let _ = entry.delete_credential();
Ok(())
})
.await
.expect("Blocking task panicked");
result.expect("Keyring operations failed");
}