chore: use monorepo organization
This commit is contained in:
parent
deaf7d6ecc
commit
a687827f7e
1099 changed files with 8184 additions and 11535 deletions
2
packages/server/tests/stress/utils/default-config.json
Normal file
2
packages/server/tests/stress/utils/default-config.json
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
{"config":{"wallets_BTC_coin":"BTC","wallets_BTC_wallet":"mock-wallet","wallets_BTC_ticker":"mock-ticker","wallets_BTC_exchange":"mock-exchange","wallets_BTC_zeroConf":"all-zero-conf","locale_id":"32cc539a-78e6-4a1d-96d8-31b7aa628e1f","locale_country":"US","locale_fiatCurrency":"USD","locale_languages":["en-US"],"locale_cryptoCurrencies":["BTC"],"commissions_minimumTx":1,"commissions_fixedFee":1,"commissions_cashOut":1,"commissions_cashIn":1,"commissions_id":"719b9dd9-1444-42fc-918a-f8b2265513ac"}}
|
||||
|
||||
5
packages/server/tests/stress/utils/index.js
Normal file
5
packages/server/tests/stress/utils/index.js
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
function randomIntFromInterval (min, max) {
|
||||
return Math.floor(Math.random() * (max - min + 1) + min)
|
||||
}
|
||||
|
||||
module.exports = { randomIntFromInterval }
|
||||
12
packages/server/tests/stress/utils/init-cert.js
Normal file
12
packages/server/tests/stress/utils/init-cert.js
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
const path = require('path')
|
||||
const variables = require('./variables')
|
||||
const { init } = require(`../${variables.MACHINE_PATH}/lib/pairing`)
|
||||
|
||||
const number = process.argv[2]
|
||||
|
||||
const certPath = {
|
||||
cert: path.resolve(process.cwd(), 'machines', number, 'client.pem'),
|
||||
key: path.resolve(process.cwd(), 'machines', number, 'client.key')
|
||||
}
|
||||
|
||||
init(certPath)
|
||||
3
packages/server/tests/stress/utils/save-config.js
Normal file
3
packages/server/tests/stress/utils/save-config.js
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
const config = require('./default-config.json')
|
||||
|
||||
console.log(JSON.stringify(config))
|
||||
7
packages/server/tests/stress/utils/variables.js
Normal file
7
packages/server/tests/stress/utils/variables.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
const SERVER_CERT_PATH = `../../certs/Lamassu_OP_Root_CA.pem`
|
||||
const MACHINE_PATH = `../../../lamassu-machine`
|
||||
|
||||
// Request timers
|
||||
const POLLING_INTERVAL = 5000
|
||||
|
||||
module.exports = { SERVER_CERT_PATH, MACHINE_PATH, POLLING_INTERVAL }
|
||||
Loading…
Add table
Add a link
Reference in a new issue