This is an automated email from the ASF dual-hosted git repository. suyanhanx pushed a commit to branch random-root-nodejs-test in repository https://gitbox.apache.org/repos/asf/incubator-opendal.git
commit d3da263600894cb9423f835fe8ebf50cc35a3b20 Author: suyanhanx <[email protected]> AuthorDate: Wed Nov 1 19:45:01 2023 +0800 fix Signed-off-by: suyanhanx <[email protected]> --- bindings/nodejs/tests/suites/index.mjs | 2 +- bindings/nodejs/tests/utils.mjs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bindings/nodejs/tests/suites/index.mjs b/bindings/nodejs/tests/suites/index.mjs index 7ed5f613e..5a25bfc3d 100644 --- a/bindings/nodejs/tests/suites/index.mjs +++ b/bindings/nodejs/tests/suites/index.mjs @@ -33,7 +33,7 @@ export function runner(testName, scheme) { const config = loadConfigFromEnv(scheme) if (checkRandomRootEnabled()) { - config.root = generateRandomRoot() + config.root = generateRandomRoot(config.root) } const operator = scheme ? new Operator(scheme, config) : undefined diff --git a/bindings/nodejs/tests/utils.mjs b/bindings/nodejs/tests/utils.mjs index 8998f6cd1..4c5292ddd 100644 --- a/bindings/nodejs/tests/utils.mjs +++ b/bindings/nodejs/tests/utils.mjs @@ -35,11 +35,11 @@ export function loadTestSchemeFromEnv() { } export function checkRandomRootEnabled() { - return process.env.OPENDAL_DISABLE_RANDOM_ROOT !== 'false' + return process.env.OPENDAL_DISABLE_RANDOM_ROOT === 'true' } -export function generateRandomRoot() { - return `/opendal_${crypto.randomUUID()}` +export function generateRandomRoot(baseRoot) { + return `${baseRoot}/opendal_${crypto.randomUUID()}` } export function loadConfigFromEnv(scheme) {
