Skip to content

Commit 4fbd72e

Browse files
committed
???
1 parent 65efaad commit 4fbd72e

File tree

2 files changed

+14
-16
lines changed

2 files changed

+14
-16
lines changed

mise.toml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,18 @@ run = """
174174
cargo 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"]
178190
alias = 'lm'
179191
description = "Runs test/s"
@@ -354,7 +366,7 @@ echo
354366
355367
mise --env tls run proxy:up proxy-tls --extra-args "--detach --wait"
356368
mise --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
358370
mise --env tls run proxy:down
359371
360372
echo
@@ -369,7 +381,7 @@ unset CS_DEFAULT_KEYSET_ID
369381
370382
mise --env tls run proxy:up proxy-tls --extra-args "--detach --wait"
371383
mise --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
374386
echo "'set CS_DEFAULT_KEYSET_ID = {{default_keyset_id}}'"
375387
export CS_DEFAULT_KEYSET_ID="{{default_keyset_id}}"

packages/cipherstash-proxy-integration/src/common.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff 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.
234220
pub async fn query_direct_by<T>(sql: &str, param: &(dyn ToSql + Sync)) -> Vec<T>
235221
where
236222
T: for<'a> tokio_postgres::types::FromSql<'a>,

0 commit comments

Comments
 (0)