From d4139b421ff58da6771ec42aa7ee7bec399b8ce0 Mon Sep 17 00:00:00 2001 From: Pavel Mikhalkevich Date: Thu, 30 Nov 2023 23:53:01 +0500 Subject: [PATCH] Add info to README on running e2e tests locally --- README.md | 13 +++++++++++++ README.tpl | 13 +++++++++++++ 2 files changed, 26 insertions(+) diff --git a/README.md b/README.md index bce45270..299f924d 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/README.tpl b/README.tpl index 9e6f090f..f1ec8085 100644 --- a/README.tpl +++ b/README.tpl @@ -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.