mirror of
https://github.com/hashicorp/vault.git
synced 2025-08-05 22:27:03 +02:00
updates start-vault script to launch headless firefox for local testing (#29945)
This commit is contained in:
parent
5905f43e1f
commit
173c3fe800
@ -37,6 +37,7 @@
|
||||
"test:quick": "node scripts/start-vault.js --split=8 --preserve-test-name --parallel",
|
||||
"test:quick-oss": "node scripts/start-vault.js -f='!enterprise' --split=8 --preserve-test-name --parallel",
|
||||
"test:filter": "node scripts/start-vault.js --server -f='!enterprise'",
|
||||
"test:dev": "node scripts/start-vault.js",
|
||||
"vault": "VAULT_REDIRECT_ADDR=http://127.0.0.1:8200 vault server -log-level=error -dev -dev-root-token-id=root -dev-ha -dev-transactional",
|
||||
"vault:cluster": "VAULT_REDIRECT_ADDR=http://127.0.0.1:8202 vault server -log-level=error -dev -dev-root-token-id=root -dev-listen-address=127.0.0.1:8202 -dev-ha -dev-transactional"
|
||||
},
|
||||
|
@ -69,9 +69,15 @@ async function processLines(input, eachLine = () => {}) {
|
||||
}
|
||||
});
|
||||
try {
|
||||
// only the test:filter command specifies --server by default
|
||||
const verb = process.argv[2] === '--server' ? 'test' : 'exam';
|
||||
await testHelper.run('ember', [verb, ...process.argv.slice(2)]);
|
||||
// ignore first 2 args (node and path) and extract flags to pass to test/exam command
|
||||
const args = process.argv.slice(2);
|
||||
const withServer = args.includes('--server') || args.includes('-s');
|
||||
// current issue with headless Chrome where an event listener in Hds::Modal is not triggered resulting in a pending test waiter and timeout
|
||||
// the workaround for now is to run the tests in headless firefox for local runs
|
||||
if (!withServer && !process.env.CI) {
|
||||
args.push('--launch=Firefox');
|
||||
}
|
||||
await testHelper.run('ember', ['exam', ...args]);
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
process.exit(1);
|
||||
|
@ -25,6 +25,9 @@ module.exports = {
|
||||
'--window-size=1440,900',
|
||||
].filter(Boolean),
|
||||
},
|
||||
Firefox: {
|
||||
ci: ['--headless'],
|
||||
},
|
||||
},
|
||||
proxies: {
|
||||
'/v1': {
|
||||
|
Loading…
Reference in New Issue
Block a user