Skip to content

Commit 940d4d0

Browse files
committed
fix: get sqlx mig add test passing
1 parent f895ff9 commit 940d4d0

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

sqlx-cli/tests/add.rs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ impl AddMigrations {
9696
}
9797

9898
fn with_config(mut self, filename: &str) -> anyhow::Result<Self> {
99-
let path = format!("sqlx-cli/tests/assets/{filename}");
99+
let path = format!("./tests/assets/{filename}");
100100

101101
let path = std::fs::canonicalize(&path)
102102
.with_context(|| format!("error canonicalizing path {path:?}"))?;
@@ -328,12 +328,17 @@ fn add_migration_config_default_type_reversible() -> anyhow::Result<()> {
328328
.run("hello world3", false, false, false, true)?
329329
.fs_output()?;
330330

331-
assert_eq!(files.len(), 3);
332-
files.assert_is_not_reversible();
331+
assert_eq!(files.len(), 6);
332+
files.assert_is_reversible();
333333

334334
files[0].assert_is_timestamp();
335-
files[1].assert_is_timestamp();
335+
assert_eq!(files[1].id, files[0].id);
336+
336337
files[2].assert_is_timestamp();
338+
assert_eq!(files[3].id, files[2].id);
339+
340+
files[4].assert_is_timestamp();
341+
assert_eq!(files[5].id, files[4].id);
337342

338343
Ok(())
339344
}

0 commit comments

Comments
 (0)