@@ -51,7 +51,7 @@ async fn test_ping_influx_db_tokio() {
5151async fn test_connection_error ( ) {
5252 let test_name = "test_connection_error" ;
5353 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" ) ;
5555 let read_query = Query :: raw_read_query ( "SELECT * FROM weather" ) ;
5656 let read_result = client. query ( & read_query) . await ;
5757 assert_result_err ( & read_result) ;
@@ -75,15 +75,15 @@ async fn test_authed_write_and_read() {
7575 run_test (
7676 || async move {
7777 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" ) ;
7979 let query = format ! ( "CREATE DATABASE {}" , TEST_NAME ) ;
8080 client
8181 . query ( & Query :: raw_read_query ( query) )
8282 . await
8383 . expect ( "could not setup db" ) ;
8484
8585 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" ) ;
8787 let write_query = Timestamp :: Hours ( 11 )
8888 . into_query ( "weather" )
8989 . add_field ( "temperature" , 82 ) ;
@@ -100,7 +100,7 @@ async fn test_authed_write_and_read() {
100100 } ,
101101 || async move {
102102 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" ) ;
104104 let query = format ! ( "DROP DATABASE {}" , TEST_NAME ) ;
105105
106106 client
@@ -123,15 +123,15 @@ async fn test_wrong_authed_write_and_read() {
123123 run_test (
124124 || async move {
125125 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" ) ;
127127 let query = format ! ( "CREATE DATABASE {}" , TEST_NAME ) ;
128128 client
129129 . query ( & Query :: raw_read_query ( query) )
130130 . await
131131 . expect ( "could not setup db" ) ;
132132
133133 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" ) ;
135135 let write_query = Timestamp :: Hours ( 11 )
136136 . into_query ( "weather" )
137137 . add_field ( "temperature" , 82 ) ;
@@ -156,7 +156,7 @@ async fn test_wrong_authed_write_and_read() {
156156 ) ,
157157 }
158158
159- let client = Client :: new ( "http://localhost :9086" , TEST_NAME )
159+ let client = Client :: new ( "http://127.0.0.1 :9086" , TEST_NAME )
160160 . with_auth ( "nopriv_user" , "password" ) ;
161161 let read_query = Query :: raw_read_query ( "SELECT * FROM weather" ) ;
162162 let read_result = client. query ( & read_query) . await ;
@@ -171,7 +171,7 @@ async fn test_wrong_authed_write_and_read() {
171171 } ,
172172 || async move {
173173 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" ) ;
175175 let query = format ! ( "DROP DATABASE {}" , TEST_NAME ) ;
176176 client
177177 . query ( & Query :: raw_read_query ( query) )
@@ -193,13 +193,13 @@ async fn test_non_authed_write_and_read() {
193193 run_test (
194194 || async move {
195195 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" ) ;
197197 let query = format ! ( "CREATE DATABASE {}" , TEST_NAME ) ;
198198 client
199199 . query ( & Query :: raw_read_query ( query) )
200200 . await
201201 . 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 ) ;
203203 let write_query = Timestamp :: Hours ( 11 )
204204 . into_query ( "weather" )
205205 . add_field ( "temperature" , 82 ) ;
@@ -226,7 +226,7 @@ async fn test_non_authed_write_and_read() {
226226 } ,
227227 || async move {
228228 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" ) ;
230230 let query = format ! ( "DROP DATABASE {}" , TEST_NAME ) ;
231231 client
232232 . query ( & Query :: raw_read_query ( query) )
0 commit comments