18 lines
603 B
Rust
18 lines
603 B
Rust
use sqlx::postgres::PgPoolOptions;
|
|
|
|
#[tokio::test]
|
|
async fn remove_standalone_credential_fixture_rows() {
|
|
if std::env::var("REMORA_QUALIFICATION_REQUIRE").is_err() {
|
|
return;
|
|
}
|
|
let database_url = std::env::var("DATABASE_URL").expect("DATABASE_URL");
|
|
let pool = PgPoolOptions::new()
|
|
.max_connections(1)
|
|
.connect(&database_url)
|
|
.await
|
|
.expect("connect postgres");
|
|
sqlx::query("TRUNCATE execution_grant_credential_pins, source_credentials CASCADE")
|
|
.execute(&pool)
|
|
.await
|
|
.expect("clear standalone credential fixtures");
|
|
}
|