diff --git a/packages/core/cli/src/commands/e2e.js b/packages/core/cli/src/commands/e2e.js index 4e54f613e..ee702a446 100644 --- a/packages/core/cli/src/commands/e2e.js +++ b/packages/core/cli/src/commands/e2e.js @@ -33,7 +33,7 @@ const checkServer = async (duration = 1000, max = 60 * 10) => { } }) .catch((error) => { - console.error('Request error:', error.message); + console.error('Request error:', error?.response?.data?.error); }); }, duration); }); @@ -128,6 +128,12 @@ const filterArgv = () => { if (element === '--skip-reporter') { continue; } + if (element === '--build') { + continue; + } + if (element === '--production') { + continue; + } argv.push(element); } return argv; @@ -150,8 +156,12 @@ module.exports = (cli) => { .option('--url [url]') .option('--skip-reporter') .option('--build') + .option('--production') .action(async (options) => { process.env.__E2E__ = true; + if (options.production) { + process.env.APP_ENV = 'production'; + } if (options.build) { process.env.APP_ENV = 'production'; await run('yarn', ['build']); @@ -225,6 +235,6 @@ module.exports = (cli) => { process.env.APP_ENV = 'production'; await run('yarn', ['build']); } - await pTest(options); + await pTest({ ...options, concurrency: 1 * options.concurrency }); }); }; diff --git a/packages/core/server/src/gateway/index.ts b/packages/core/server/src/gateway/index.ts index 2d6a5ab3f..6cd1b5540 100644 --- a/packages/core/server/src/gateway/index.ts +++ b/packages/core/server/src/gateway/index.ts @@ -325,8 +325,6 @@ export class Gateway extends EventEmitter { const mainApp = AppSupervisor.getInstance().bootMainApp(options.mainAppOptions); - await mainApp.load(); - mainApp .runAsCLI(process.argv, { throwError: true,