jax-common 0.1.11

Core data structures and cryptography for JaxBucket - end-to-end encrypted P2P storage
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! Integration tests for Mount save/load persistence

mod common;

use ::common::mount::Mount;

#[tokio::test]
async fn test_save_load() {
    let (mount, blobs, secret_key, _temp) = common::setup_test_env().await;
    let (link, _previous_link, height) = mount.save(&blobs, None).await.unwrap();
    assert_eq!(height, 1); // Height should be 1 after first save
    let loaded_mount = Mount::load(&link, &secret_key, &blobs).await.unwrap();
    assert_eq!(loaded_mount.inner().await.height(), 1);
}