Files
js-openstack-lib/configure-devstack.js
Corentin Ardeois 327dceee2b Add configure-devstack task for devstack gate
This patch adds 'configure-devstack' task to enable CORS headers in
keystone before functional-test are run.
No 'ini' library was used as I didn't find any supporting section
syntax "[[post-config|$KEYSTONE_CONF]]"

Change-Id: I7f335bbba3a768387a7d77916df019ba46e5519f
2016-08-08 16:22:25 -04:00

18 lines
485 B
JavaScript

/*eslint no-process-env: "off" */
import fs from 'fs';
import karma from 'karma/lib/config';
import path from 'path';
function getDevstackConfig() {
const karmaConfig = karma.parseConfig(path.resolve('./karma.conf.js'));
return "[[post-config|$KEYSTONE_CONF]]\n" +
"[cors]\n" +
"allowed_origin=http://localhost:" + karmaConfig.port + "\n";
}
fs.appendFile(process.env.BASE + '/new/devstack/local.conf', getDevstackConfig(), (err) => {
if (err) {
throw err;
}
});