Skip to content
Open
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
Cargo.lock
target/

.idea/
.vscode/
.*.swp
.!*

# Using the `Dockerfile.template` in the root directory now.
Dockerfile
Expand Down
23 changes: 23 additions & 0 deletions step13_testcontainers/code/.junie/guidelines.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# High-level

Never remove existing tests, or the logic from them -- your job is to make existing tests build and pass if they fail to.
Write no comments, keep the code self-descriptive.
Respect Rust formatting rules in `../../rustfmt.toml`. No need to bring this `rustfmt.toml` into this project's directory from `../../`.
Keep Rust edition at 2024 in `Cargo.toml`.

# When Contributing

Only make small, self-contained changes.
Make sure they are readable and understood in isolation -- with no comments, from the code alone!
Do not add doctests for the sake of adding doctests, although if a standalone function calls for a doctest -- do add it!
Feel free to use `cargo doc` to examine the docs, but do not add `--open` to `cargo doc`!
If the project is using `ntest`, add `#[ntest::timeout(5000)]` to new tests. Do not modify or add/remove timeouts for existing tests.

# Before Committing

Every source file including `Cargo.toml` should end with a newline.
Run `cargo fmt` to ensure the style is consistent.
Run `cargo test` to ensure all tests pass.
Run `cargo check` to verify compilation.
Remove unused dependencies.
Ensure no build warnings.
22 changes: 22 additions & 0 deletions step13_testcontainers/code/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[package]
name = "testcontainers_example"
edition = "2024"

[[bin]]
name = "redis_publisher"
path = "src/publish.rs"

[[bin]]
name = "redis_subscriber"
path = "src/subscribe.rs"

[dependencies]
redis = { version = "0.29.2", features = ["tokio-comp"] }
tokio = { version = "1", features = ["full"] }
anyhow = "1.0"
testcontainers = "0.15"
testcontainers-modules = { version = "0.3", features = ["redis"] }
futures-util = "0.3"

[dev-dependencies]
ntest = "0.9.0"
Loading