Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions mise.toml
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,16 @@ mise --env tls run test:wait_for_postgres_to_quack --port 6432 --max-retries 20
cargo nextest run --no-fail-fast --nocapture -E 'package(cipherstash-proxy-integration)'
mise --env tls run proxy:down

echo
echo '###############################################'
echo '# Test: Showcase'
echo '###############################################'
echo
mise --env tls run proxy:up proxy-tls --extra-args "--detach --wait"
mise --env tls run test:wait_for_postgres_to_quack --port 6432 --max-retries 20 --tls
RUST_BACKTRACE=full cargo run -p showcase
mise --env tls run proxy:down

echo
echo '###############################################'
echo '# Test: Language-specific integration'
Expand Down
6 changes: 1 addition & 5 deletions packages/showcase/src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,7 @@ pub const PG_V17_TLS: u16 = 5617;

static INIT: Once = Once::new();

pub async fn reset_schema_to(schema: &'static str) {
let port = std::env::var("CS_DATABASE__PORT")
.map(|s| s.parse().unwrap())
.unwrap_or(PG_LATEST);

pub async fn reset_schema_to(schema: &'static str, port: u16) {
let client = connect_with_tls(port).await;
client.simple_query(schema).await.unwrap();
}
Expand Down
4 changes: 2 additions & 2 deletions packages/showcase/src/schema.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::common::reset_schema_to;
use crate::common::{reset_schema_to, PROXY};

const SCHEMA: &str = include_str!("./schema.sql");

pub async fn setup_schema() {
reset_schema_to(SCHEMA).await
reset_schema_to(SCHEMA, PROXY).await
}