Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add #![cfg(any(feature ...))], to reduce warning in cargo test #2177

Merged
merged 1 commit into from
Apr 17, 2024
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
5 changes: 5 additions & 0 deletions tests/connection_tests.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
#![cfg(any(
feature = "sqlx-mysql",
feature = "sqlx-sqlite",
feature = "sqlx-postgres"
))]
pub mod common;

pub use common::{bakery_chain::*, setup::*, TestContext};
Expand Down
5 changes: 5 additions & 0 deletions tests/cursor_tests.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
#![cfg(any(
feature = "sqlx-mysql",
feature = "sqlx-sqlite",
feature = "sqlx-postgres"
))]
pub mod common;

pub use common::{features::*, setup::*, TestContext};
Expand Down
2 changes: 1 addition & 1 deletion tests/json_vec_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ pub async fn insert_json_struct_vec_derive(db: &DatabaseConnection) -> Result<()
],
};

let result = json_vec.clone().into_active_model().insert(db).await?;
let _result = json_vec.clone().into_active_model().insert(db).await?;

let model = json_vec_derive::json_struct_vec::Entity::find()
.filter(json_vec_derive::json_struct_vec::Column::Id.eq(json_vec.id))
Expand Down
5 changes: 5 additions & 0 deletions tests/loader_tests.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
#![cfg(any(
feature = "sqlx-mysql",
feature = "sqlx-sqlite",
feature = "sqlx-postgres"
))]
pub mod common;

pub use common::{bakery_chain::*, setup::*, TestContext};
Expand Down
5 changes: 5 additions & 0 deletions tests/partial_model_tests.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
#![cfg(any(
feature = "sqlx-mysql",
feature = "sqlx-sqlite",
feature = "sqlx-postgres"
))]
use entity::{Column, Entity};
use sea_orm::{ColumnTrait, DerivePartialModel, EntityTrait, FromQueryResult, ModelTrait};
use sea_query::Expr;
Expand Down
5 changes: 5 additions & 0 deletions tests/pi_tests.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
#![cfg(any(
feature = "sqlx-mysql",
feature = "sqlx-sqlite",
feature = "sqlx-postgres"
))]
pub mod common;

use common::{features::*, setup::*, TestContext};
Expand Down
5 changes: 5 additions & 0 deletions tests/relational_tests.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
#![cfg(any(
feature = "sqlx-mysql",
feature = "sqlx-sqlite",
feature = "sqlx-postgres"
))]
pub mod common;

pub use chrono::offset::Utc;
Expand Down
5 changes: 5 additions & 0 deletions tests/returning_tests.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
#![cfg(any(
feature = "sqlx-mysql",
feature = "sqlx-sqlite",
feature = "sqlx-postgres"
))]
pub mod common;

pub use common::{bakery_chain::*, setup::*, TestContext};
Expand Down
5 changes: 5 additions & 0 deletions tests/self_join_tests.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
#![cfg(any(
feature = "sqlx-mysql",
feature = "sqlx-sqlite",
feature = "sqlx-postgres"
))]
pub mod common;

pub use common::{features::*, setup::*, TestContext};
Expand Down
5 changes: 5 additions & 0 deletions tests/sequential_op_tests.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
#![cfg(any(
feature = "sqlx-mysql",
feature = "sqlx-sqlite",
feature = "sqlx-postgres"
))]
pub mod common;

pub use chrono::offset::Utc;
Expand Down
5 changes: 5 additions & 0 deletions tests/time_crate_tests.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
#![cfg(any(
feature = "sqlx-mysql",
feature = "sqlx-sqlite",
feature = "sqlx-postgres"
))]
pub mod common;
pub use common::{features::*, setup::*, TestContext};
use pretty_assertions::assert_eq;
Expand Down
5 changes: 5 additions & 0 deletions tests/transaction_tests.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
#![cfg(any(
feature = "sqlx-mysql",
feature = "sqlx-sqlite",
feature = "sqlx-postgres"
))]
pub mod common;

pub use common::{bakery_chain::*, setup::*, TestContext};
Expand Down
Loading