mirror of
https://github.com/hashicorp/vault.git
synced 2025-08-06 22:57:02 +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": "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: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: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": "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"
|
"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 {
|
try {
|
||||||
// only the test:filter command specifies --server by default
|
// ignore first 2 args (node and path) and extract flags to pass to test/exam command
|
||||||
const verb = process.argv[2] === '--server' ? 'test' : 'exam';
|
const args = process.argv.slice(2);
|
||||||
await testHelper.run('ember', [verb, ...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) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
|
@ -25,6 +25,9 @@ module.exports = {
|
|||||||
'--window-size=1440,900',
|
'--window-size=1440,900',
|
||||||
].filter(Boolean),
|
].filter(Boolean),
|
||||||
},
|
},
|
||||||
|
Firefox: {
|
||||||
|
ci: ['--headless'],
|
||||||
|
},
|
||||||
},
|
},
|
||||||
proxies: {
|
proxies: {
|
||||||
'/v1': {
|
'/v1': {
|
||||||
|
Loading…
Reference in New Issue
Block a user