@@ -7,16 +7,15 @@ use crate::command::cmd;
77use super :: SERVICE ;
88
99#[ tokio:: test]
10- async fn from_template ( ) {
10+ async fn from_template ( ) -> anyhow :: Result < ( ) > {
1111 let id = SERVICE
1212 . create ( )
1313 . summary ( "summary" )
1414 . component ( "TestComponent" )
1515 . product ( "TestProduct" )
1616 . description ( "description" )
1717 . send ( )
18- . await
19- . unwrap ( ) ;
18+ . await ?;
2019
2120 let dir = tempdir ( ) . unwrap ( ) ;
2221 let path = dir. path ( ) . join ( "template" ) ;
@@ -33,29 +32,23 @@ async fn from_template() {
3332 . assert ( )
3433 . success ( ) ;
3534
36- let bug = SERVICE
37- . get ( [ id] )
38- . send ( )
39- . await
40- . unwrap ( )
41- . into_iter ( )
42- . next ( )
43- . unwrap ( ) ;
35+ let bug = SERVICE . get ( [ id] ) . send ( ) . await ?. into_iter ( ) . next ( ) . unwrap ( ) ;
4436
4537 assert_eq ! ( bug. summary. unwrap( ) , "new-summary" ) ;
38+
39+ Ok ( ( ) )
4640}
4741
4842#[ tokio:: test]
49- async fn multiple_bugs ( ) {
43+ async fn multiple_bugs ( ) -> anyhow :: Result < ( ) > {
5044 let id1 = SERVICE
5145 . create ( )
5246 . summary ( "summary" )
5347 . component ( "TestComponent" )
5448 . product ( "TestProduct" )
5549 . description ( "description" )
5650 . send ( )
57- . await
58- . unwrap ( ) ;
51+ . await ?;
5952
6053 let id2 = SERVICE
6154 . create ( )
@@ -64,8 +57,7 @@ async fn multiple_bugs() {
6457 . product ( "TestProduct" )
6558 . description ( "description" )
6659 . send ( )
67- . await
68- . unwrap ( ) ;
60+ . await ?;
6961
7062 cmd ! ( "bite bugzilla update {id1} {id2} -S new-summary" )
7163 . assert ( )
@@ -74,12 +66,13 @@ async fn multiple_bugs() {
7466 let ( bug1, bug2) = SERVICE
7567 . get ( [ id1, id2] )
7668 . send ( )
77- . await
78- . unwrap ( )
69+ . await ?
7970 . into_iter ( )
8071 . collect_tuple ( )
8172 . unwrap ( ) ;
8273
8374 assert_eq ! ( bug1. summary. unwrap( ) , "new-summary" ) ;
8475 assert_eq ! ( bug2. summary. unwrap( ) , "new-summary" ) ;
76+
77+ Ok ( ( ) )
8578}
0 commit comments