Skip to content

Commit

Permalink
Add info to README on running e2e tests locally
Browse files Browse the repository at this point in the history
  • Loading branch information
rustworthy committed Nov 30, 2023
1 parent b63eadf commit d4139b4
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,16 @@ if let Err(e) = c.run(&["default"]) {
println!("worker failed: {}", e);
}
```

## Run test suite locally

First ensure the "Factory" service is running and accepting connections on your machine.
To launch it a [Factory](https://hub.docker.com/r/contribsys/faktory/) container with [docker](https://docs.docker.com/engine/install/), run:
```bash
docker run --rm -it -v faktory-data:/var/lib/faktory -p 127.0.0.1:7419:7419 -p 127.0.0.1:7420:7420 contribsys/faktory:latest /faktory -b :7419 -w :7420
```
After that run the tests:
```bash
FAKTORY_URL=tcp://127.0.0.1:7419 cargo test --all-features --locked --all-targets
```
Please note that setting "FAKTORY_URL" environment variable is required for e2e tests to not be skipped.
13 changes: 13 additions & 0 deletions README.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,16 @@
[![dependency status](https://deps.rs/repo/github/jonhoo/faktory-rs/status.svg)](https://deps.rs/repo/github/jonhoo/faktory-rs)

{{readme}}

## Run test suite locally

First ensure the "Factory" service is running and accepting connections on your machine.
To launch it a [Factory](https://hub.docker.com/r/contribsys/faktory/) container with [docker](https://docs.docker.com/engine/install/), run:
```bash
docker run --rm -it -v faktory-data:/var/lib/faktory -p 127.0.0.1:7419:7419 -p 127.0.0.1:7420:7420 contribsys/faktory:latest /faktory -b :7419 -w :7420
```
After that run the tests:
```bash
FAKTORY_URL=tcp://127.0.0.1:7419 cargo test --all-features --locked --all-targets
```
Please note that setting "FAKTORY_URL" environment variable is required for e2e tests to not be skipped.

0 comments on commit d4139b4

Please sign in to comment.