File tree 2 files changed +52
-52
lines changed
tokio-postgres/tests/test
2 files changed +52
-52
lines changed Original file line number Diff line number Diff line change @@ -147,58 +147,6 @@ async fn scram_password_ok() {
147
147
connect ( "user=scram_user password=password dbname=postgres" ) . await ;
148
148
}
149
149
150
- #[ tokio:: test]
151
- async fn host_only_ok ( ) {
152
- let _ = tokio_postgres:: connect (
153
- "host=localhost port=5433 user=pass_user dbname=postgres password=password" ,
154
- NoTls ,
155
- )
156
- . await
157
- . unwrap ( ) ;
158
- }
159
-
160
- #[ tokio:: test]
161
- async fn hostaddr_only_ok ( ) {
162
- let _ = tokio_postgres:: connect (
163
- "hostaddr=127.0.0.1 port=5433 user=pass_user dbname=postgres password=password" ,
164
- NoTls ,
165
- )
166
- . await
167
- . unwrap ( ) ;
168
- }
169
-
170
- #[ tokio:: test]
171
- async fn hostaddr_and_host_ok ( ) {
172
- let _ = tokio_postgres:: connect (
173
- "hostaddr=127.0.0.1 host=localhost port=5433 user=pass_user dbname=postgres password=password" ,
174
- NoTls ,
175
- )
176
- . await
177
- . unwrap ( ) ;
178
- }
179
-
180
- #[ tokio:: test]
181
- async fn hostaddr_host_mismatch ( ) {
182
- let _ = tokio_postgres:: connect (
183
- "hostaddr=127.0.0.1,127.0.0.2 host=localhost port=5433 user=pass_user dbname=postgres password=password" ,
184
- NoTls ,
185
- )
186
- . await
187
- . err ( )
188
- . unwrap ( ) ;
189
- }
190
-
191
- #[ tokio:: test]
192
- async fn hostaddr_host_both_missing ( ) {
193
- let _ = tokio_postgres:: connect (
194
- "port=5433 user=pass_user dbname=postgres password=password" ,
195
- NoTls ,
196
- )
197
- . await
198
- . err ( )
199
- . unwrap ( ) ;
200
- }
201
-
202
150
#[ tokio:: test]
203
151
async fn pipelined_prepare ( ) {
204
152
let client = connect ( "user=postgres" ) . await ;
Original file line number Diff line number Diff line change @@ -66,6 +66,58 @@ async fn target_session_attrs_err() {
66
66
. unwrap ( ) ;
67
67
}
68
68
69
+ #[ tokio:: test]
70
+ async fn host_only_ok ( ) {
71
+ let _ = tokio_postgres:: connect (
72
+ "host=localhost port=5433 user=pass_user dbname=postgres password=password" ,
73
+ NoTls ,
74
+ )
75
+ . await
76
+ . unwrap ( ) ;
77
+ }
78
+
79
+ #[ tokio:: test]
80
+ async fn hostaddr_only_ok ( ) {
81
+ let _ = tokio_postgres:: connect (
82
+ "hostaddr=127.0.0.1 port=5433 user=pass_user dbname=postgres password=password" ,
83
+ NoTls ,
84
+ )
85
+ . await
86
+ . unwrap ( ) ;
87
+ }
88
+
89
+ #[ tokio:: test]
90
+ async fn hostaddr_and_host_ok ( ) {
91
+ let _ = tokio_postgres:: connect (
92
+ "hostaddr=127.0.0.1 host=localhost port=5433 user=pass_user dbname=postgres password=password" ,
93
+ NoTls ,
94
+ )
95
+ . await
96
+ . unwrap ( ) ;
97
+ }
98
+
99
+ #[ tokio:: test]
100
+ async fn hostaddr_host_mismatch ( ) {
101
+ let _ = tokio_postgres:: connect (
102
+ "hostaddr=127.0.0.1,127.0.0.2 host=localhost port=5433 user=pass_user dbname=postgres password=password" ,
103
+ NoTls ,
104
+ )
105
+ . await
106
+ . err ( )
107
+ . unwrap ( ) ;
108
+ }
109
+
110
+ #[ tokio:: test]
111
+ async fn hostaddr_host_both_missing ( ) {
112
+ let _ = tokio_postgres:: connect (
113
+ "port=5433 user=pass_user dbname=postgres password=password" ,
114
+ NoTls ,
115
+ )
116
+ . await
117
+ . err ( )
118
+ . unwrap ( ) ;
119
+ }
120
+
69
121
#[ tokio:: test]
70
122
async fn cancel_query ( ) {
71
123
let client = connect ( "host=localhost port=5433 user=postgres" ) . await ;
You can’t perform that action at this time.
0 commit comments