File tree Expand file tree Collapse file tree 3 files changed +8
-10
lines changed
packages/cipherstash-proxy-integration/src Expand file tree Collapse file tree 3 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -200,6 +200,11 @@ pub async fn simple_query_with_null(sql: &str) -> Vec<Option<String>> {
200
200
. collect ( )
201
201
}
202
202
203
+ pub async fn insert ( sql : & str , params : & [ & ( dyn ToSql + Sync ) ] ) {
204
+ let client = connect_with_tls ( PROXY ) . await ;
205
+ client. query ( sql, params) . await . unwrap ( ) ;
206
+ }
207
+
203
208
pub async fn insert_jsonb ( ) -> Value {
204
209
let id = random_id ( ) ;
205
210
@@ -214,6 +219,7 @@ pub async fn insert_jsonb() -> Value {
214
219
} ) ;
215
220
216
221
let sql = "INSERT INTO encrypted (id, encrypted_jsonb) VALUES ($1, $2)" . to_string ( ) ;
222
+
217
223
insert ( & sql, & [ & id, & encrypted_jsonb] ) . await ;
218
224
219
225
encrypted_jsonb
Original file line number Diff line number Diff line change 7
7
assert_eq ! ( e, a) ;
8
8
}
9
9
}
10
-
11
- pub fn assert_expected_as_string < T > ( expected : & [ T ] , actual : & [ String ] )
12
- where
13
- T : std:: fmt:: Display + PartialEq + std:: fmt:: Debug ,
14
- {
15
- assert_eq ! ( expected. len( ) , actual. len( ) ) ;
16
- for ( e, a) in expected. iter ( ) . zip ( actual) {
17
- assert_eq ! ( e. to_string( ) , * a) ;
18
- }
19
- }
Original file line number Diff line number Diff line change
1
+ #[ cfg( test) ]
1
2
pub mod assert;
3
+
2
4
pub mod json_path;
You can’t perform that action at this time.
0 commit comments