1919
2020]]
2121
22+ local opendal = require (" opendal" )
23+
2224describe (" opendal unit test" , function ()
2325 describe (" opendal fs schema" , function ()
2426 it (" operator function in fs schema" , function ()
25- local opendal = require (" opendal" )
2627 local op , err = opendal .operator .new (" fs" ,{root = " /tmp" })
2728 assert .is_nil (err )
2829 assert .is_nil (op :write (" test.txt" ," hello world" ))
@@ -34,7 +35,6 @@ describe("opendal unit test", function()
3435 assert .equal (op :is_exist (" test.txt" ), false )
3536 end )
3637 it (" meta function in fs schema" , function ()
37- local opendal = require (" opendal" )
3838 local op , err = opendal .operator .new (" fs" ,{root = " /tmp" })
3939 assert .is_nil (err )
4040 assert .is_nil (op :write (" test.txt" ," hello world" ))
@@ -53,7 +53,6 @@ describe("opendal unit test", function()
5353 end )
5454 describe (" opendal memory schema" , function ()
5555 it (" operator function in memory schema" , function ()
56- local opendal = require (" opendal" )
5756 local op , err = opendal .operator .new (" memory" ,{root = " /tmp" })
5857 assert .is_nil (err )
5958 assert .is_nil (op :write (" test.txt" ," hello world" ))
@@ -65,7 +64,6 @@ describe("opendal unit test", function()
6564 assert .equal (op :is_exist (" test.txt" ), false )
6665 end )
6766 it (" meta function in memory schema" , function ()
68- local opendal = require (" opendal" )
6967 local op , err = opendal .operator .new (" memory" ,{root = " /tmp" })
7068 assert .is_nil (err )
7169 assert .is_nil (op :write (" test.txt" ," hello world" ))
0 commit comments