mirror of
https://github.com/launchbadge/sqlx.git
synced 2025-10-02 07:21:08 +00:00
19 lines
518 B
Rust
19 lines
518 B
Rust
use sqlx::migrate::Migrator;
|
|
use std::path::Path;
|
|
|
|
static EMBEDDED: Migrator = sqlx::migrate!("tests/migrate/migrations");
|
|
|
|
#[sqlx_macros::test]
|
|
async fn same_output() -> anyhow::Result<()> {
|
|
let runtime = Migrator::new(Path::new("tests/migrate/migrations")).await?;
|
|
|
|
for (e, r) in EMBEDDED.iter().zip(runtime.iter()) {
|
|
assert_eq!(e.version, r.version);
|
|
assert_eq!(e.description, r.description);
|
|
assert_eq!(e.sql, r.sql);
|
|
assert_eq!(e.checksum, r.checksum);
|
|
}
|
|
|
|
Ok(())
|
|
}
|