@@ -36,7 +36,10 @@ fn test_write_field() {
36
36
let client = create_client ( ) ;
37
37
let query = InfluxDbQuery :: write_query ( "weather" ) . add_field ( "temperature" , 82 ) ;
38
38
let result = get_runtime ( ) . block_on ( client. query ( query) ) ;
39
- assert ! ( result. is_ok( ) , "Should be no error" ) ;
39
+ assert ! (
40
+ result. is_ok( ) ,
41
+ format!( "Should be no error: {}" , result. unwrap_err( ) )
42
+ ) ;
40
43
}
41
44
42
45
#[ test]
@@ -47,7 +50,10 @@ fn test_read() {
47
50
let client = create_client ( ) ;
48
51
let query = InfluxDbQuery :: raw_read_query ( "SELECT * FROM weather" ) ;
49
52
let result = get_runtime ( ) . block_on ( client. query ( query) ) ;
50
- assert ! ( result. is_ok( ) , "Should be no error" ) ;
53
+ assert ! (
54
+ result. is_ok( ) ,
55
+ format!( "Should be no error: {}" , result. unwrap_err( ) )
56
+ ) ;
51
57
assert ! (
52
58
!result. unwrap( ) . contains( "error" ) ,
53
59
"Data contained a database error"
@@ -72,5 +78,8 @@ fn test_json_query() {
72
78
let query = InfluxDbQuery :: raw_read_query ( "SELECT * FROM weather" ) ;
73
79
let result = get_runtime ( ) . block_on ( client. json_query :: < Weather , _ > ( query) ) ;
74
80
75
- assert ! ( result. is_ok( ) , "We could read from the DB" ) ;
81
+ assert ! (
82
+ result. is_ok( ) ,
83
+ format!( "We couldn't read from the DB: {}" , result. unwrap_err( ) )
84
+ ) ;
76
85
}
0 commit comments