Skip to content

Commit 6b58356

Browse files
authored
Merge pull request #292 from cipherstash/rh/cip-1624/showcase-ci
ci(showcase): Adds Showcase to CI runs
2 parents eb5edd4 + 8457f83 commit 6b58356

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

mise.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,16 @@ mise --env tls run test:wait_for_postgres_to_quack --port 6432 --max-retries 20
344344
cargo nextest run --no-fail-fast --nocapture -E 'package(cipherstash-proxy-integration)'
345345
mise --env tls run proxy:down
346346
347+
echo
348+
echo '###############################################'
349+
echo '# Test: Showcase'
350+
echo '###############################################'
351+
echo
352+
mise --env tls run proxy:up proxy-tls --extra-args "--detach --wait"
353+
mise --env tls run test:wait_for_postgres_to_quack --port 6432 --max-retries 20 --tls
354+
RUST_BACKTRACE=full cargo run -p showcase
355+
mise --env tls run proxy:down
356+
347357
echo
348358
echo '###############################################'
349359
echo '# Test: Language-specific integration'

packages/showcase/src/common.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,7 @@ pub const PG_V17_TLS: u16 = 5617;
1414

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

17-
pub async fn reset_schema_to(schema: &'static str) {
18-
let port = std::env::var("CS_DATABASE__PORT")
19-
.map(|s| s.parse().unwrap())
20-
.unwrap_or(PG_LATEST);
21-
17+
pub async fn reset_schema_to(schema: &'static str, port: u16) {
2218
let client = connect_with_tls(port).await;
2319
client.simple_query(schema).await.unwrap();
2420
}

packages/showcase/src/schema.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
use crate::common::reset_schema_to;
1+
use crate::common::{reset_schema_to, PROXY};
22

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

55
pub async fn setup_schema() {
6-
reset_schema_to(SCHEMA).await
6+
reset_schema_to(SCHEMA, PROXY).await
77
}

0 commit comments

Comments
 (0)