File tree Expand file tree Collapse file tree 2 files changed +14
-16
lines changed
packages/cipherstash-proxy-integration/src Expand file tree Collapse file tree 2 files changed +14
-16
lines changed Original file line number Diff line number Diff line change @@ -174,6 +174,18 @@ run = """
174174cargo nextest run --no-fail-fast --nocapture -p cipherstash-proxy-integration
175175"""
176176
177+ [tasks ."test:integration:without_multitenant" ]
178+ description = " Runs integration tests excluding multitenant"
179+ run = """
180+ cargo nextest run --no-fail-fast --nocapture -E 'package(cipherstash-proxy-integration) and not test(multitenant)'
181+ """
182+
183+ [tasks ."test:integration:multitenant" ]
184+ description = " Runs multitenant integration tests only"
185+ run = """
186+ cargo nextest run --no-fail-fast --nocapture -E 'package(cipherstash-proxy-integration) and test(multitenant)'
187+ """
188+
177189[tasks ."test:local:mapper" ]
178190alias = ' lm'
179191description = " Runs test/s"
354366
355367mise --env tls run proxy:up proxy-tls --extra-args "--detach --wait"
356368mise --env tls run test:wait_for_postgres_to_quack --port 6432 --max-retries 20 --tls
357- cargo nextest run --no-fail-fast --nocapture -E 'package(cipherstash-proxy-integration) and not test(multitenant)'
369+ mise run test:integration:without_multitenant
358370mise --env tls run proxy:down
359371
360372echo
@@ -369,7 +381,7 @@ unset CS_DEFAULT_KEYSET_ID
369381
370382mise --env tls run proxy:up proxy-tls --extra-args "--detach --wait"
371383mise --env tls run test:wait_for_postgres_to_quack --port 6432 --max-retries 20 --tls
372- cargo nextest run --no-fail-fast --nocapture -E 'package(cipherstash-proxy-integration) and test( multitenant)'
384+ mise run test:integration: multitenant
373385
374386echo "'set CS_DEFAULT_KEYSET_ID = {{default_keyset_id}}'"
375387export CS_DEFAULT_KEYSET_ID="{{default_keyset_id}}"
Original file line number Diff line number Diff line change @@ -217,20 +217,6 @@ fn get_database_port() -> u16 {
217217 . unwrap_or ( PG_PORT )
218218}
219219
220- /// Query directly from PostgreSQL, bypassing the proxy.
221- /// Uses CS_DATABASE__HOST and CS_DATABASE__PORT to ensure same DB as proxy.
222- pub async fn query_direct < T > ( sql : & str ) -> Vec < T >
223- where
224- T : for < ' a > tokio_postgres:: types:: FromSql < ' a > ,
225- {
226- let port = get_database_port ( ) ;
227- let client = connect_with_tls ( port) . await ;
228- let rows = client. query ( sql, & [ ] ) . await . unwrap ( ) ;
229- rows. iter ( ) . map ( |row| row. get ( 0 ) ) . collect ( )
230- }
231-
232- /// Query directly from PostgreSQL with a parameter, bypassing the proxy.
233- /// Uses CS_DATABASE__HOST and CS_DATABASE__PORT to ensure same DB as proxy.
234220pub async fn query_direct_by < T > ( sql : & str , param : & ( dyn ToSql + Sync ) ) -> Vec < T >
235221where
236222 T : for < ' a > tokio_postgres:: types:: FromSql < ' a > ,
You can’t perform that action at this time.
0 commit comments