mirror of
https://github.com/launchbadge/sqlx
synced 2024-11-10 06:24:16 +00:00
fix: gate sqlcipher
testing behind cfg
to make development less annoying
This commit is contained in:
parent
dfb60141bd
commit
e5c18b354e
3 changed files with 8 additions and 1 deletions
3
.github/workflows/sqlx.yml
vendored
3
.github/workflows/sqlx.yml
vendored
|
@ -167,6 +167,9 @@ jobs:
|
|||
matrix:
|
||||
runtime: [async-std, tokio]
|
||||
needs: check
|
||||
env:
|
||||
# Enable tests with SQLCipher
|
||||
RUSTFLAGS: --cfg sqlite_test_sqlcipher
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
|
|
|
@ -177,7 +177,10 @@ hex = "0.4.3"
|
|||
tempfile = "3.9.0"
|
||||
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"] }
|
||||
|
||||
#
|
||||
|
|
|
@ -125,6 +125,7 @@ async fn it_fails_if_password_is_incorrect() -> anyhow::Result<()> {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
#[cfg(sqlite_test_sqlcipher)]
|
||||
#[sqlx_macros::test]
|
||||
async fn it_honors_order_of_encryption_pragmas() -> anyhow::Result<()> {
|
||||
let (url, _dir) = new_db_url().await?;
|
||||
|
|
Loading…
Reference in a new issue