Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to run in the background #21

Open
mathieudevos opened this issue Apr 4, 2018 · 1 comment
Open

Allow to run in the background #21

mathieudevos opened this issue Apr 4, 2018 · 1 comment

Comments

@mathieudevos
Copy link

As simple as this command is, this is truly required on any setup that requires testing.

Ideally in my mocha tests, I would write in the global_config.js:

/* eslint-disable */
const dynamodbLocal = require('dynamodb-localhost');

// setup the database
before(async function () {
  await dynamodbLocal.install();
  await dynamodbLocal.start({ port: 8000 });
});

// teardown
after(async function() {
  await dynamodbLocal.stop();
});

// run before each test
beforeEach(() => {});

// run after each test
afterEach(() => {});

Obviously with other test files next to it, who just make a dynamodb connection to the local test database.
This setup, the serverless plugin, or the original dynamodb-local, none of them support the option to run this in the background, as such, these are all useless when attempting to run a CI/CD job on. I can't tell a pipeline to "press ctrl-c" when you're done.

@ThorstenBux
Copy link

ThorstenBux commented Sep 19, 2018

https://www.npmjs.com/package/dynamodb-local allows for running detached

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants