Skip to content

Commit 1c07371

Browse files
committed
editoast: fix duplicate key of rolling_stock_name_key
1 parent bea3588 commit 1c07371

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
@@ -3,6 +3,7 @@ pub mod tests {
33
use std::io::Cursor;
44
use std::ops::{Deref, DerefMut};
55
use std::sync::Arc;
6+
use uuid::Uuid;
67

78
use crate::client::PostgresConfig;
89
use crate::modelsv2::database::connection_pool::create_connection_pool;
@@ -259,8 +260,7 @@ pub mod tests {
259260
} = scenario_fixture_set().await;
260261

261262
let pathfinding = pathfinding(db_pool()).await;
262-
let mut rs_name = "fast_rolling_stock_".to_string();
263-
rs_name.push_str(name);
263+
let rs_name = format!("fast_rolling_stock_{}_{name}", Uuid::new_v4()).to_string();
264264
let rolling_stock = named_fast_rolling_stock(&rs_name, db_pool()).await;
265265
let ts_model = make_train_schedule(
266266
db_pool(),

0 commit comments

Comments
 (0)