@@ -279,11 +279,14 @@ async fn modify_multiple_owners() {
279279async fn check_ownership_two_crates ( ) {
280280 let ( app, anon, user) = TestApp :: init ( ) . with_user ( ) . await ;
281281 let mut conn = app. db_conn ( ) ;
282+ let mut async_conn = app. async_db_conn ( ) . await ;
282283 let user = user. as_model ( ) ;
283284
284285 let team = new_team ( "team_foo" ) . create_or_update ( & mut conn) . unwrap ( ) ;
285286 let krate_owned_by_team = CrateBuilder :: new ( "foo" , user. id ) . expect_build ( & mut conn) ;
286- add_team_to_crate ( & team, & krate_owned_by_team, user, & mut conn) . unwrap ( ) ;
287+ add_team_to_crate ( & team, & krate_owned_by_team, user, & mut async_conn)
288+ . await
289+ . unwrap ( ) ;
287290
288291 let user2 = app. db_new_user ( "user_bar" ) . await ;
289292 let user2 = user2. as_model ( ) ;
@@ -310,13 +313,16 @@ async fn check_ownership_two_crates() {
310313async fn check_ownership_one_crate ( ) {
311314 let ( app, anon, user) = TestApp :: init ( ) . with_user ( ) . await ;
312315 let mut conn = app. db_conn ( ) ;
316+ let mut async_conn = app. async_db_conn ( ) . await ;
313317 let user = user. as_model ( ) ;
314318
315319 let team = new_team ( "github:test_org:team_sloth" )
316320 . create_or_update ( & mut conn)
317321 . unwrap ( ) ;
318322 let krate = CrateBuilder :: new ( "best_crate" , user. id ) . expect_build ( & mut conn) ;
319- add_team_to_crate ( & team, & krate, user, & mut conn) . unwrap ( ) ;
323+ add_team_to_crate ( & team, & krate, user, & mut async_conn)
324+ . await
325+ . unwrap ( ) ;
320326
321327 let json: TeamResponse = anon
322328 . get ( "/api/v1/crates/best_crate/owner_team" )
@@ -339,13 +345,16 @@ async fn check_ownership_one_crate() {
339345async fn add_existing_team ( ) {
340346 let ( app, _, user, token) = TestApp :: init ( ) . with_token ( ) . await ;
341347 let mut conn = app. db_conn ( ) ;
348+ let mut async_conn = app. async_db_conn ( ) . await ;
342349 let user = user. as_model ( ) ;
343350
344351 let t = new_team ( "github:test_org:bananas" )
345352 . create_or_update ( & mut conn)
346353 . unwrap ( ) ;
347354 let krate = CrateBuilder :: new ( "best_crate" , user. id ) . expect_build ( & mut conn) ;
348- add_team_to_crate ( & t, & krate, user, & mut conn) . unwrap ( ) ;
355+ add_team_to_crate ( & t, & krate, user, & mut async_conn)
356+ . await
357+ . unwrap ( ) ;
349358
350359 let ret = token
351360 . add_named_owner ( "best_crate" , "github:test_org:bananas" )
0 commit comments