This is an automated email from the ASF dual-hosted git repository.

suyanhanx pushed a commit to branch nodejs-stream
in repository https://gitbox.apache.org/repos/asf/incubator-opendal.git


The following commit(s) were added to refs/heads/nodejs-stream by this push:
     new a766d556a fix empty root
a766d556a is described below

commit a766d556aff1e54760d57b5a5439c07cf9ccb00a
Author: suyanhanx <[email protected]>
AuthorDate: Sun Nov 26 16:13:48 2023 +0800

    fix empty root
    
    Signed-off-by: suyanhanx <[email protected]>
---
 bindings/nodejs/tests/suites/index.mjs | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/bindings/nodejs/tests/suites/index.mjs 
b/bindings/nodejs/tests/suites/index.mjs
index cbfe739ee..e9f706f8a 100644
--- a/bindings/nodejs/tests/suites/index.mjs
+++ b/bindings/nodejs/tests/suites/index.mjs
@@ -34,7 +34,11 @@ export function runner(testName, scheme) {
   const config = loadConfigFromEnv(scheme)
 
   if (checkRandomRootEnabled()) {
-    config.root = generateRandomRoot(config.root)
+    if (config.root) {
+      config.root = generateRandomRoot(config.root)
+    } else {
+      console.warn("The root is not set. Won't generate random root.")
+    }
   }
 
   let operator = scheme ? new Operator(scheme, config) : null

Reply via email to