bf8deba64e
This patch adds 'functional' tests that will be run by DSVM gate. A 'cloudsConfig.js' file reads 'clouds.yaml' and converts it to json. 'clouds.yaml' file is searched from the following locations: - current directory - ~/.config/openstack - /etc/openstack The first file found wins. For browser, webpack uses a 'yaml' loader and rewrites 'helper/cloudsConfig.js' requirement to 'json!yaml!clouds.yaml'. A dummy test has been added to demonstrate use of devstack config. Change-Id: I55909862c70a4cbe22b2820e51c2969d68d8154a
29 lines
631 B
JavaScript
29 lines
631 B
JavaScript
import webpack from 'webpack';
|
|
import cloudsYamlPath from './test/functional/helpers/cloudsYamlPath';
|
|
|
|
export default {
|
|
entry: ['./src/index.js'],
|
|
output: {
|
|
path: './dist',
|
|
filename: 'js-openstack-lib.js',
|
|
library: 'JSOpenStackLib',
|
|
libraryTarget: 'umd'
|
|
},
|
|
module: {
|
|
loaders: [
|
|
{
|
|
test: /\.js$/,
|
|
loader: 'babel',
|
|
exclude: /node_modules/,
|
|
query: {
|
|
plugins: ['transform-inline-environment-variables']
|
|
}
|
|
}
|
|
]
|
|
},
|
|
plugins: [
|
|
new webpack.NormalModuleReplacementPlugin(/helpers\/cloudsConfig/,
|
|
'json!yaml!' + cloudsYamlPath)
|
|
]
|
|
};
|