Skip to content

Commit 6d5d45c

Browse files
committed
ci: connect to pg directly.
1 parent 4fbd72e commit 6d5d45c

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

mise.toml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -323,8 +323,6 @@ echo
323323
mise --env tcp run postgres:setup
324324
mise --env tls run postgres:setup
325325
326-
mise run test:integration:showcase
327-
328326
echo
329327
echo '###############################################'
330328
echo '# Test: Prometheus'
@@ -366,7 +364,7 @@ echo
366364
367365
mise --env tls run proxy:up proxy-tls --extra-args "--detach --wait"
368366
mise --env tls run test:wait_for_postgres_to_quack --port 6432 --max-retries 20 --tls
369-
mise run test:integration:without_multitenant
367+
mise --env tls run test:integration:without_multitenant
370368
mise --env tls run proxy:down
371369
372370
echo
@@ -381,7 +379,7 @@ unset CS_DEFAULT_KEYSET_ID
381379
382380
mise --env tls run proxy:up proxy-tls --extra-args "--detach --wait"
383381
mise --env tls run test:wait_for_postgres_to_quack --port 6432 --max-retries 20 --tls
384-
mise run test:integration:multitenant
382+
mise --env tls run test:integration:multitenant
385383
386384
echo "'set CS_DEFAULT_KEYSET_ID = {{default_keyset_id}}'"
387385
export CS_DEFAULT_KEYSET_ID="{{default_keyset_id}}"

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ use rustls::{
88
use serde_json::Value;
99
use std::sync::{Arc, Once};
1010
use tokio_postgres::{types::ToSql, Client, NoTls, Row, SimpleQueryMessage};
11+
use tracing::info;
1112
use tracing_subscriber::{filter::Directive, EnvFilter, FmtSubscriber};
1213

1314
pub const PROXY: u16 = 6432;
@@ -116,7 +117,7 @@ pub fn trace() {
116117
pub fn connection_config(port: u16) -> tokio_postgres::Config {
117118
let mut db_config = tokio_postgres::Config::new();
118119

119-
let host = std::env::var("CS_DATABASE__HOST").unwrap_or_else(|_| "localhost".to_string());
120+
let host = "localhost".to_string();
120121
let name = "cipherstash".to_string();
121122
let username = "cipherstash".to_string();
122123
let password = "p@ssword".to_string();
@@ -222,6 +223,8 @@ where
222223
T: for<'a> tokio_postgres::types::FromSql<'a>,
223224
{
224225
let port = get_database_port();
226+
info!(port);
227+
225228
let client = connect_with_tls(port).await;
226229
let rows = client.query(sql, &[param]).await.unwrap();
227230
rows.iter().map(|row| row.get(0)).collect()

0 commit comments

Comments
 (0)