Skip to content

Commit d06d182

Browse files
committed
editoast: fix duplicate key of rolling_stock_name_key
1 parent 081f495 commit d06d182

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

editoast/src/fixtures.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ pub mod tests {
44
use std::io::Cursor;
55
use std::ops::{Deref, DerefMut};
66
use std::sync::Arc;
7+
use uuid::Uuid;
78

89
use editoast_models::create_connection_pool;
910
use editoast_models::DbConnection;
@@ -261,8 +262,7 @@ pub mod tests {
261262
} = scenario_fixture_set().await;
262263

263264
let pathfinding = pathfinding(db_pool()).await;
264-
let mut rs_name = "fast_rolling_stock_".to_string();
265-
rs_name.push_str(name);
265+
let rs_name = format!("fast_rolling_stock_{}_{name}", Uuid::new_v4()).to_string();
266266
let rolling_stock = named_fast_rolling_stock(&rs_name, db_pool()).await;
267267
let ts_model = make_train_schedule(
268268
db_pool(),

0 commit comments

Comments
 (0)