Skip to content

Commit f05e600

Browse files
authored
Merge pull request diesel-rs#649 from diesel-rs/sg-mysql-tests
cfg out of tests that use `get_result` for MySQL
2 parents 8350657 + 9c32662 commit f05e600

4 files changed

Lines changed: 6 additions & 5 deletions

File tree

diesel_tests/tests/annotations.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ use schema::*;
2828
// }
2929

3030
#[test]
31+
#[cfg(not(any(feature="sqlite", feature="mysql")))]
3132
fn association_where_parent_and_child_have_underscores() {
3233
#[derive(PartialEq, Eq, Debug, Clone, Queryable, Identifiable, Associations)]
3334
#[has_many(special_comments)]

diesel_tests/tests/delete.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ fn delete_single_record() {
2929
}
3030

3131
#[test]
32-
#[cfg(not(feature = "sqlite"))]
32+
#[cfg(not(any(feature="sqlite", feature="mysql")))]
3333
fn return_deleted_records() {
3434
use schema::users::dsl::*;
3535
let connection = connection_with_sean_and_tess_in_users_table();

diesel_tests/tests/insert.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ fn insert_records() {
2121
}
2222

2323
#[test]
24-
#[cfg(not(feature = "sqlite"))]
24+
#[cfg(not(any(feature="sqlite", feature="mysql")))]
2525
fn insert_records_using_returning_clause() {
2626
use schema::users::table as users;
2727
let connection = connection();
@@ -40,7 +40,7 @@ fn insert_records_using_returning_clause() {
4040
}
4141

4242
#[test]
43-
#[cfg(not(feature = "sqlite"))]
43+
#[cfg(not(any(feature="sqlite", feature="mysql")))]
4444
fn insert_records_with_custom_returning_clause() {
4545
use schema::users::dsl::*;
4646

diesel_tests/tests/update.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ fn test_updating_multiple_columns() {
7171
}
7272

7373
#[test]
74-
#[cfg(not(feature="sqlite"))]
74+
#[cfg(not(any(feature="sqlite", feature="mysql")))]
7575
fn update_returning_struct() {
7676
use schema::users::dsl::*;
7777

@@ -85,7 +85,7 @@ fn update_returning_struct() {
8585
}
8686

8787
#[test]
88-
#[cfg(not(feature="sqlite"))]
88+
#[cfg(not(any(feature="sqlite", feature="mysql")))]
8989
fn update_with_custom_returning_clause() {
9090
use schema::users::dsl::*;
9191

0 commit comments

Comments
 (0)