@@ -288,8 +288,8 @@ mod tests {
288288 use crate :: github:: CommitSha ;
289289 use crate :: github:: api:: client:: HideCommentReason ;
290290 use crate :: tests:: default_repo_name;
291- use crate :: tests:: { BorsBuilder , Comment , GitHub , User , WorkflowEvent , run_test} ;
292291 use crate :: tests:: { BorsTester , Branch , Commit } ;
292+ use crate :: tests:: { Comment , GitHub , User , WorkflowEvent , run_test} ;
293293 use octocrab:: params:: checks:: { CheckRunConclusion , CheckRunStatus } ;
294294
295295 #[ sqlx:: test]
@@ -839,30 +839,29 @@ try-job: Bar
839839
840840 #[ sqlx:: test]
841841 async fn try_build_failed_modify_labels ( pool : sqlx:: PgPool ) {
842- BorsBuilder :: new ( pool)
843- . github ( GitHub :: default ( ) . with_default_config (
844- r#"
842+ let gh = GitHub :: default ( ) . with_default_config (
843+ r#"
845844[labels]
846845try_failed = ["+foo", "+bar", "-baz"]
847846"# ,
848- ) )
849- . run_test ( async |ctx : & mut BorsTester | {
850- ctx. post_comment ( "@bors try" ) . await ?;
851- insta:: assert_snapshot!( ctx. get_next_comment_text( ( ) ) . await ?, @r"
847+ ) ;
848+ run_test ( ( pool , gh ) , async |ctx : & mut BorsTester | {
849+ ctx. post_comment ( "@bors try" ) . await ?;
850+ insta:: assert_snapshot!( ctx. get_next_comment_text( ( ) ) . await ?, @r"
852851 :hourglass: Trying commit pr-1-sha with merge merge-0-pr-1…
853852
854853 To cancel the try build, run the command `@bors try cancel`.
855854 " ) ;
856- ctx. pr ( ( ) ) . await . expect_added_labels ( & [ ] ) ;
857- ctx. workflow_full_failure ( ctx. try_workflow ( ) ) . await ?;
858- ctx. expect_comments ( ( ) , 1 ) . await ;
859- ctx. pr ( ( ) )
860- . await
861- . expect_added_labels ( & [ "foo" , "bar" ] )
862- . expect_removed_labels ( & [ "baz" ] ) ;
863- Ok ( ( ) )
864- } )
865- . await ;
855+ ctx. pr ( ( ) ) . await . expect_added_labels ( & [ ] ) ;
856+ ctx. workflow_full_failure ( ctx. try_workflow ( ) ) . await ?;
857+ ctx. expect_comments ( ( ) , 1 ) . await ;
858+ ctx. pr ( ( ) )
859+ . await
860+ . expect_added_labels ( & [ "foo" , "bar" ] )
861+ . expect_removed_labels ( & [ "baz" ] ) ;
862+ Ok ( ( ) )
863+ } )
864+ . await ;
866865 }
867866
868867 #[ sqlx:: test]
0 commit comments