From c6fd6da96dc17a9c25c002dddbd0023dcd742138 Mon Sep 17 00:00:00 2001 From: kiran94 Date: Thu, 9 Jun 2022 23:31:05 +0100 Subject: [PATCH 1/3] chore(testing): add docker compose for testing --- docker-compose.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 docker-compose.yml diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..a7b0c57 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,12 @@ +version: "3.1" + +services: + redis1: + image: redis + ports: + - 56379:6379 + + redis2: + image: redis + ports: + - 56378:6379 From b3a77fa334ea1f1be81983a11d2fd4782f243636 Mon Sep 17 00:00:00 2001 From: kiran94 Date: Thu, 9 Jun 2022 23:34:45 +0100 Subject: [PATCH 2/3] docs(readme): add testing instructions --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index 87c98d9..9fdfa08 100644 --- a/README.md +++ b/README.md @@ -46,3 +46,18 @@ func main() { fmt.Println(err) } ``` + +## Developing + +### Running Tests + +```bash +# Start the Redis Containers +docker-compose up -d + +# Run Tests +go test ./... + +# Stop the Containers +docker-compose down +``` From c4a4c05839d73bc9cab379f2141c0bd272844d19 Mon Sep 17 00:00:00 2001 From: vvanglro <947001731@qq.com> Date: Fri, 10 Jun 2022 10:39:32 +0800 Subject: [PATCH 3/3] chore(testing): pre-commit --- docker-compose.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index a7b0c57..081d32b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,9 +4,9 @@ services: redis1: image: redis ports: - - 56379:6379 + - "56379:6379" redis2: image: redis ports: - - 56378:6379 + - "56378:6379"