Skip to content
This repository has been archived by the owner on Aug 12, 2020. It is now read-only.

Ability to set database password #17

Open
sholladay opened this issue Jan 14, 2018 · 0 comments
Open

Ability to set database password #17

sholladay opened this issue Jan 14, 2018 · 0 comments

Comments

@sholladay
Copy link

This is a feature request to support passing options to RethinkDB from the init() method.

In particular, I want to set RethinkDB's --initial-password option. I imagine doing it like this...

import test from 'ava';
import { init, cleanup } from 'ava-rethinkdb';

const initialData = {};
const option = {
    password : 'abcdefg'
};

test.before(init(initialData, option));
test.after.always(cleanup);

Now, you might ask, why would I want to set a password, since it's just a test?

Well, it would make it much easier to test my app directly, because my app enforces the use of a database password in order to avoid mistakes that could have nasty consequences in production. I don't want to conditionally enforce it based on environment configuration, as that is something very prone to error as well. My preferred solution is to just always have a password. In the tests, the password can be hardcoded and that's fine.

Great project, btw! I hope it will help more people adopt RethinkDB. Now if only I could install the database from npm...

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

No branches or pull requests

1 participant