xk6-frostfs/scenarios/libs/env-parser.js
Denis Kirillov ed58333aba [#11] Support reading env variables from file
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
2023-03-15 09:13:34 +03:00

10 lines
263 B
JavaScript

import env from 'k6/x/frostfs/env';
export function parseEnv() {
if (__ENV.ENV_FILE) {
const parsedVars = env.parse(__ENV.ENV_FILE)
for (const prop in parsedVars) {
__ENV[prop] = __ENV[prop] || parsedVars[prop];
}
}
}