limiteron 0.2.1

Unified flow control framework for Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! 存储适配器模块集成测试

#[cfg(feature = "postgres")]
use limiteron::adapters::StorageFactory;

#[cfg(feature = "postgres")]
#[tokio::test]
async fn test_storage_factory_new() {
    let config = limiteron::adapters::StorageFactoryConfig::postgres("postgresql://localhost/test");
    let _ = StorageFactory::new(config);
}

#[cfg(feature = "postgres")]
#[tokio::test]
async fn test_storage_factory_from_dsn() {
    let factory = StorageFactory::from_dsn("postgresql://localhost/test");
    assert!(!factory.is_initialized());
}