Skip to main content

rusticity_term/session/
mod.rs

1mod core;
2pub mod ui;
3
4pub use core::{Session, SessionTab};
5pub use ui::render_session_picker;
6
7#[cfg(test)]
8mod tests {
9    use super::*;
10
11    #[test]
12    fn test_session_id_unique() {
13        let session1 = Session::new(
14            "profile1".to_string(),
15            "us-east-1".to_string(),
16            "123".to_string(),
17            String::new(),
18        );
19
20        std::thread::sleep(std::time::Duration::from_millis(1100));
21
22        let session2 = Session::new(
23            "profile2".to_string(),
24            "us-west-2".to_string(),
25            "456".to_string(),
26            String::new(),
27        );
28
29        assert_ne!(session1.id, session2.id);
30    }
31}