split adding and dropping columns tests
This commit is contained in:
parent
868624c6a9
commit
da3c13f0a2
@ -929,7 +929,7 @@ mod tests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn dynamic_add_drop_columns() {
|
fn add_columns() {
|
||||||
let config = DatabaseConfig::default();
|
let config = DatabaseConfig::default();
|
||||||
let config_5 = DatabaseConfig::with_columns(Some(5));
|
let config_5 = DatabaseConfig::with_columns(Some(5));
|
||||||
|
|
||||||
@ -946,6 +946,20 @@ mod tests {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// reopen as 5.
|
||||||
|
{
|
||||||
|
let db = Database::open(&config_5, path.as_path().to_str().unwrap()).unwrap();
|
||||||
|
assert_eq!(db.num_columns(), 5);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn drop_columns() {
|
||||||
|
let config = DatabaseConfig::default();
|
||||||
|
let config_5 = DatabaseConfig::with_columns(Some(5));
|
||||||
|
|
||||||
|
let path = RandomTempPath::create_dir();
|
||||||
|
|
||||||
// open 5, remove all.
|
// open 5, remove all.
|
||||||
{
|
{
|
||||||
let db = Database::open(&config_5, path.as_path().to_str().unwrap()).unwrap();
|
let db = Database::open(&config_5, path.as_path().to_str().unwrap()).unwrap();
|
||||||
|
Loading…
Reference in New Issue
Block a user