From 8e386cfd66aa627760d9f077d7d017f3ad4dfb3f Mon Sep 17 00:00:00 2001 From: Morgan Roderick Date: Sat, 23 Dec 2023 20:30:43 +0100 Subject: [PATCH] chore: start DynamoDB local with docker-compose This removes the need for starting it separately, leaving the use with only one command to run before running tests --- docker-compose.yml | 5 +++++ test/RateLimiterDynamo.test.js | 4 ---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index e6d9398..5a6d2cf 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,3 +5,8 @@ services: container_name: cache ports: - 6379:6379 + dynamodb: + image: amazon/dynamodb-local + container_name: dynamo + ports: + - 8000:8000 diff --git a/test/RateLimiterDynamo.test.js b/test/RateLimiterDynamo.test.js index 3549eec..27a7163 100644 --- a/test/RateLimiterDynamo.test.js +++ b/test/RateLimiterDynamo.test.js @@ -4,10 +4,6 @@ const { describe, it } = require('mocha'); const RateLimiterDynamo = require('../lib/RateLimiterDynamo'); const sinon = require('sinon'); -/* - In order to perform this tests, you need to run a local instance of dynamodb: - docker run -p 8000:8000 amazon/dynamodb-local -*/ describe('RateLimiterDynamo with fixed window', function RateLimiterDynamoTest() { this.timeout(5000);