artisan_middleware 5.7.1

The main services of the artisan platform to allow communication and management of linux system services
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#[cfg(test)]
mod tests {
    use crate::identity::Identifier;

    #[tokio::test]
    async fn test_identifier_new_and_verify() {
        let ident = Identifier::new().await.expect("create identifier");
        assert!(ident.verify().await, "identifier verification failed");
    }

    #[tokio::test]
    async fn test_identifier_json_roundtrip() {
        let ident = Identifier::new().await.unwrap();
        let json = ident.to_json().unwrap();
        let decoded: Identifier = serde_json::from_str(&json).unwrap();
        assert_eq!(ident, decoded);
    }
}