Skip to content

Commit bdb32f3

Browse files
committed
Make ConnectionBuilder migration test more specific
By excluding all tables that are not part of the test from the assert.
1 parent a54a49e commit bdb32f3

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

internal/mithril-persistence/src/sqlite/connection_builder.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -247,15 +247,13 @@ mod tests {
247247

248248
let tables_list = execute_single_cell_query(
249249
&connection,
250+
// Note: exclude sqlite system tables and migration system `db_version` table
250251
"SELECT group_concat(name) FROM sqlite_schema \
251-
WHERE type = 'table' AND name NOT LIKE 'sqlite_%' \
252+
WHERE type = 'table' AND name NOT LIKE 'sqlite_%' AND name != 'db_version' \
252253
ORDER BY name;",
253254
);
254255

255-
assert_eq!(
256-
Value::String("db_version,first,second".to_string()),
257-
tables_list
258-
);
256+
assert_eq!(Value::String("first,second".to_string()), tables_list);
259257
}
260258

261259
#[test]

0 commit comments

Comments
 (0)