stack

Attribute Macro stack 

Source
#[stack]
Expand description

Configure the stack of containers for a test.

Example:

use teststack::stack;
#[stack(postgres(db_name = "test"))]
#[tokio::test]
async fn test(pool: sqlx::PgPool) {
   let db_name: String = sqlx::query_scalar("SELECT current_database()")
       .fetch_one(&pool)
       .await
       .unwrap();
   assert_eq!(db_name, "test");
}