@@ -51,7 +51,7 @@ async fn test_ping_influx_db_tokio() {
51
51
async fn test_connection_error ( ) {
52
52
let test_name = "test_connection_error" ;
53
53
let client =
54
- Client :: new ( "http://localhost :10086" , test_name) . with_auth ( "nopriv_user" , "password" ) ;
54
+ Client :: new ( "http://127.0.0.1 :10086" , test_name) . with_auth ( "nopriv_user" , "password" ) ;
55
55
let read_query = Query :: raw_read_query ( "SELECT * FROM weather" ) ;
56
56
let read_result = client. query ( & read_query) . await ;
57
57
assert_result_err ( & read_result) ;
@@ -75,15 +75,15 @@ async fn test_authed_write_and_read() {
75
75
run_test (
76
76
|| async move {
77
77
let client =
78
- Client :: new ( "http://localhost :9086" , TEST_NAME ) . with_auth ( "admin" , "password" ) ;
78
+ Client :: new ( "http://127.0.0.1 :9086" , TEST_NAME ) . with_auth ( "admin" , "password" ) ;
79
79
let query = format ! ( "CREATE DATABASE {}" , TEST_NAME ) ;
80
80
client
81
81
. query ( & Query :: raw_read_query ( query) )
82
82
. await
83
83
. expect ( "could not setup db" ) ;
84
84
85
85
let client =
86
- Client :: new ( "http://localhost :9086" , TEST_NAME ) . with_auth ( "admin" , "password" ) ;
86
+ Client :: new ( "http://127.0.0.1 :9086" , TEST_NAME ) . with_auth ( "admin" , "password" ) ;
87
87
let write_query = Timestamp :: Hours ( 11 )
88
88
. into_query ( "weather" )
89
89
. add_field ( "temperature" , 82 ) ;
@@ -100,7 +100,7 @@ async fn test_authed_write_and_read() {
100
100
} ,
101
101
|| async move {
102
102
let client =
103
- Client :: new ( "http://localhost :9086" , TEST_NAME ) . with_auth ( "admin" , "password" ) ;
103
+ Client :: new ( "http://127.0.0.1 :9086" , TEST_NAME ) . with_auth ( "admin" , "password" ) ;
104
104
let query = format ! ( "DROP DATABASE {}" , TEST_NAME ) ;
105
105
106
106
client
@@ -123,15 +123,15 @@ async fn test_wrong_authed_write_and_read() {
123
123
run_test (
124
124
|| async move {
125
125
let client =
126
- Client :: new ( "http://localhost :9086" , TEST_NAME ) . with_auth ( "admin" , "password" ) ;
126
+ Client :: new ( "http://127.0.0.1 :9086" , TEST_NAME ) . with_auth ( "admin" , "password" ) ;
127
127
let query = format ! ( "CREATE DATABASE {}" , TEST_NAME ) ;
128
128
client
129
129
. query ( & Query :: raw_read_query ( query) )
130
130
. await
131
131
. expect ( "could not setup db" ) ;
132
132
133
133
let client =
134
- Client :: new ( "http://localhost :9086" , TEST_NAME ) . with_auth ( "wrong_user" , "password" ) ;
134
+ Client :: new ( "http://127.0.0.1 :9086" , TEST_NAME ) . with_auth ( "wrong_user" , "password" ) ;
135
135
let write_query = Timestamp :: Hours ( 11 )
136
136
. into_query ( "weather" )
137
137
. add_field ( "temperature" , 82 ) ;
@@ -156,7 +156,7 @@ async fn test_wrong_authed_write_and_read() {
156
156
) ,
157
157
}
158
158
159
- let client = Client :: new ( "http://localhost :9086" , TEST_NAME )
159
+ let client = Client :: new ( "http://127.0.0.1 :9086" , TEST_NAME )
160
160
. with_auth ( "nopriv_user" , "password" ) ;
161
161
let read_query = Query :: raw_read_query ( "SELECT * FROM weather" ) ;
162
162
let read_result = client. query ( & read_query) . await ;
@@ -171,7 +171,7 @@ async fn test_wrong_authed_write_and_read() {
171
171
} ,
172
172
|| async move {
173
173
let client =
174
- Client :: new ( "http://localhost :9086" , TEST_NAME ) . with_auth ( "admin" , "password" ) ;
174
+ Client :: new ( "http://127.0.0.1 :9086" , TEST_NAME ) . with_auth ( "admin" , "password" ) ;
175
175
let query = format ! ( "DROP DATABASE {}" , TEST_NAME ) ;
176
176
client
177
177
. query ( & Query :: raw_read_query ( query) )
@@ -193,13 +193,13 @@ async fn test_non_authed_write_and_read() {
193
193
run_test (
194
194
|| async move {
195
195
let client =
196
- Client :: new ( "http://localhost :9086" , TEST_NAME ) . with_auth ( "admin" , "password" ) ;
196
+ Client :: new ( "http://127.0.0.1 :9086" , TEST_NAME ) . with_auth ( "admin" , "password" ) ;
197
197
let query = format ! ( "CREATE DATABASE {}" , TEST_NAME ) ;
198
198
client
199
199
. query ( & Query :: raw_read_query ( query) )
200
200
. await
201
201
. expect ( "could not setup db" ) ;
202
- let non_authed_client = Client :: new ( "http://localhost :9086" , TEST_NAME ) ;
202
+ let non_authed_client = Client :: new ( "http://127.0.0.1 :9086" , TEST_NAME ) ;
203
203
let write_query = Timestamp :: Hours ( 11 )
204
204
. into_query ( "weather" )
205
205
. add_field ( "temperature" , 82 ) ;
@@ -226,7 +226,7 @@ async fn test_non_authed_write_and_read() {
226
226
} ,
227
227
|| async move {
228
228
let client =
229
- Client :: new ( "http://localhost :9086" , TEST_NAME ) . with_auth ( "admin" , "password" ) ;
229
+ Client :: new ( "http://127.0.0.1 :9086" , TEST_NAME ) . with_auth ( "admin" , "password" ) ;
230
230
let query = format ! ( "DROP DATABASE {}" , TEST_NAME ) ;
231
231
client
232
232
. query ( & Query :: raw_read_query ( query) )
0 commit comments