Skip to content
Snippets Groups Projects
Commit 785c3b96 authored by Lloyd Hilaiel's avatar Lloyd Hilaiel
Browse files

lock down who may write the database for testing purposes. issue #460

parent e5f3807c
No related branches found
No related tags found
No related merge requests found
......@@ -221,8 +221,11 @@ g_config['process_type'] = path.basename(process.argv[1], ".js");
g_config['public_key'] = secrets.loadPublicKey('root', exports.get('var_path'));
// only allow the dbwriter process to write to the database
g_config.database.may_write = true; //(g_config.process_type === 'dbwriter');
// only allow the dbwriter process to write to the database (or the unit tests)
g_config.database.may_write = (g_config.process_type === 'dbwriter' ||
g_config.process_type === 'vows' ||
g_config.process_type === 'db-test');
console.log(g_config.process_type, "may write", g_config.database.may_write);
// log the process_type
setTimeout(function() {
......
......@@ -219,4 +219,3 @@ exports.addShutdownBatches = function(suite) {
}
});
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment