Skip to content

Commit 107b0b1

Browse files
committed
test: change "single_model_file" to be compile-able
1 parent 696e4ed commit 107b0b1

File tree

5 files changed

+31
-1
lines changed

5 files changed

+31
-1
lines changed

Cargo.lock

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,6 @@ members = [
5353
"test/simple_table_mysql",
5454
"test/simple_table_sqlite",
5555
"test/custom_model_and_schema_path",
56+
"test/single_model_file",
5657
]
5758
resolver = "2"

test/single_model_file/Cargo.toml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[lib]
2+
path = "lib.rs"
3+
4+
[package]
5+
name = "single_model_file"
6+
version = "0.1.0"
7+
edition = "2021"
8+
9+
[dependencies]
10+
diesel = { version = "*", default-features = false, features = [
11+
"postgres",
12+
"chrono",
13+
] }
14+
dsync = { path = "../../" }
15+
chrono = { version = "*", features = ["serde"] }
16+
serde = { version = "*", features = ["derive"] }

test/single_model_file/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
pub mod models;
2+
pub mod schema;

test/single_model_file/test.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
44

55
cd $SCRIPT_DIR
66

7-
cargo run -- -i schema.rs -o models -g id -g created_at -g updated_at -c "diesel::r2d2::PooledConnection<diesel::r2d2::ConnectionManager<diesel::pg::PgConnection>>" --single-model-file
7+
cargo run --manifest-path ../../Cargo.toml -- \
8+
-i schema.rs -o models -g id -g created_at -g updated_at -c "diesel::r2d2::PooledConnection<diesel::r2d2::ConnectionManager<diesel::pg::PgConnection>>" --single-model-file

0 commit comments

Comments
 (0)