mirror of
https://github.com/launchbadge/sqlx.git
synced 2025-10-02 15:25:32 +00:00
fix: gate sqlcipher
testing behind cfg
to make development less annoying
This commit is contained in:
parent
dfb60141bd
commit
e5c18b354e
3
.github/workflows/sqlx.yml
vendored
3
.github/workflows/sqlx.yml
vendored
@ -167,6 +167,9 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
runtime: [async-std, tokio]
|
runtime: [async-std, tokio]
|
||||||
needs: check
|
needs: check
|
||||||
|
env:
|
||||||
|
# Enable tests with SQLCipher
|
||||||
|
RUSTFLAGS: --cfg sqlite_test_sqlcipher
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
@ -177,7 +177,10 @@ hex = "0.4.3"
|
|||||||
tempfile = "3.9.0"
|
tempfile = "3.9.0"
|
||||||
criterion = { version = "0.5.1", features = ["async_tokio"] }
|
criterion = { version = "0.5.1", features = ["async_tokio"] }
|
||||||
|
|
||||||
# Needed to test SQLCipher
|
# If this is an unconditional dev-dependency then Cargo will *always* try to build `libsqlite3-sys`,
|
||||||
|
# even when SQLite isn't the intended test target, and fail if the build environment is not set up for compiling C code.
|
||||||
|
[target.'cfg(sqlite_test_sqlcipher)'.dev-dependencies]
|
||||||
|
# Enable testing with SQLCipher if specifically requested.
|
||||||
libsqlite3-sys = { version = "0.27", features = ["bundled-sqlcipher"] }
|
libsqlite3-sys = { version = "0.27", features = ["bundled-sqlcipher"] }
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -125,6 +125,7 @@ async fn it_fails_if_password_is_incorrect() -> anyhow::Result<()> {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(sqlite_test_sqlcipher)]
|
||||||
#[sqlx_macros::test]
|
#[sqlx_macros::test]
|
||||||
async fn it_honors_order_of_encryption_pragmas() -> anyhow::Result<()> {
|
async fn it_honors_order_of_encryption_pragmas() -> anyhow::Result<()> {
|
||||||
let (url, _dir) = new_db_url().await?;
|
let (url, _dir) = new_db_url().await?;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user