mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 17:27:31 +00:00
chore: init load tests (#7635)
* init load tests * add machine pat * setup app * add introspect * use xk6-modules repo * logging * add teardown * add manipulate user * add manipulate user * remove logs * convert tests to ts * add readme * zitadel * review comments
This commit is contained in:
48
load-test/webpack.config.js
Normal file
48
load-test/webpack.config.js
Normal file
@@ -0,0 +1,48 @@
|
||||
const path = require('path');
|
||||
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
|
||||
const CopyPlugin = require('copy-webpack-plugin');
|
||||
const GlobEntries = require('webpack-glob-entries');
|
||||
|
||||
module.exports = {
|
||||
mode: 'production',
|
||||
entry: GlobEntries('./src/use_cases/*.ts'), // Generates multiple entry for each test
|
||||
output: {
|
||||
path: path.join(__dirname, 'dist'),
|
||||
libraryTarget: 'commonjs',
|
||||
filename: '[name].js',
|
||||
},
|
||||
resolve: {
|
||||
extensions: ['.ts', '.js'],
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.ts$/,
|
||||
use: 'babel-loader',
|
||||
exclude: /node_modules/,
|
||||
},
|
||||
],
|
||||
},
|
||||
target: 'web',
|
||||
externals: /^(k6|https?\:\/\/)(\/.*)?/,
|
||||
// Generate map files for compiled scripts
|
||||
devtool: "source-map",
|
||||
stats: {
|
||||
colors: true,
|
||||
},
|
||||
plugins: [
|
||||
new CleanWebpackPlugin(),
|
||||
// Copy assets to the destination folder
|
||||
// see `src/post-file-test.ts` for an test example using an asset
|
||||
new CopyPlugin({
|
||||
patterns: [{
|
||||
from: path.resolve(__dirname, 'assets'),
|
||||
noErrorOnMissing: true
|
||||
}],
|
||||
}),
|
||||
],
|
||||
optimization: {
|
||||
// Don't minimize, as it's not used in the browser
|
||||
minimize: false,
|
||||
},
|
||||
};
|
Reference in New Issue
Block a user