You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by xu...@apache.org on 2023/12/07 09:10:24 UTC
(incubator-opendal) branch fix-ci created (now c83dc4d7e)
This is an automated email from the ASF dual-hosted git repository.
xuanwo pushed a change to branch fix-ci
in repository https://gitbox.apache.org/repos/asf/incubator-opendal.git
at c83dc4d7e chore: Fix bindings CI
This branch includes the following new commits:
new c83dc4d7e chore: Fix bindings CI
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(incubator-opendal) 01/01: chore: Fix bindings CI
Posted by xu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
xuanwo pushed a commit to branch fix-ci
in repository https://gitbox.apache.org/repos/asf/incubator-opendal.git
commit c83dc4d7e36a5b71239ee71f817bc876fcc6cffd
Author: Xuanwo <gi...@xuanwo.io>
AuthorDate: Thu Dec 7 17:10:10 2023 +0800
chore: Fix bindings CI
Signed-off-by: Xuanwo <gi...@xuanwo.io>
---
bindings/cpp/tests/basic_test.cpp | 8 --------
bindings/haskell/test/BasicTest.hs | 20 +-------------------
bindings/lua/test/opendal_test.lua | 4 ----
bindings/ocaml/test/test.ml | 9 ---------
4 files changed, 1 insertion(+), 40 deletions(-)
diff --git a/bindings/cpp/tests/basic_test.cpp b/bindings/cpp/tests/basic_test.cpp
index 8d3da07f8..c6fc37a0d 100644
--- a/bindings/cpp/tests/basic_test.cpp
+++ b/bindings/cpp/tests/basic_test.cpp
@@ -68,14 +68,6 @@ TEST_F(OpendalTest, BasicTest) {
op.create_dir(dir_path);
EXPECT_TRUE(op.is_exist(dir_path));
- // copy
- op.copy(file_path, file_path_copied);
- EXPECT_TRUE(op.is_exist(file_path_copied));
-
- // rename
- op.rename(file_path_copied, file_path_renamed);
- EXPECT_TRUE(op.is_exist(file_path_renamed));
-
// stat
auto metadata = op.stat(file_path);
EXPECT_EQ(metadata.type, opendal::EntryMode::FILE);
diff --git a/bindings/haskell/test/BasicTest.hs b/bindings/haskell/test/BasicTest.hs
index 77e0a6586..f61a2586f 100644
--- a/bindings/haskell/test/BasicTest.hs
+++ b/bindings/haskell/test/BasicTest.hs
@@ -46,12 +46,6 @@ testRawOperation = do
isExistOpRaw op "key2" ?= Right True
createDirOpRaw op "dir1/" ?= Right ()
isExistOpRaw op "dir1/" ?= Right True
- copyOpRaw op "key1" "key3" ?= Right ()
- isExistOpRaw op "key1" ?= Right True
- isExistOpRaw op "key3" ?= Right True
- renameOpRaw op "key2" "key4" ?= Right ()
- isExistOpRaw op "key2" ?= Right False
- isExistOpRaw op "key4" ?= Right True
statOpRaw op "key1" >>= \case
Right meta -> meta @?= except_meta
Left _ -> assertFailure "should not reach here"
@@ -59,9 +53,6 @@ testRawOperation = do
isExistOpRaw op "key1" ?= Right False
Right lister <- listOpRaw op "/"
liftIO $ findLister lister "key3" ?= True
- renameOpRaw op "key3" "/dir1/key5" ?= Right ()
- Right lister2 <- scanOpRaw op "/"
- liftIO $ findLister lister2 "dir1/key5" ?= True
where
except_meta =
Metadata
@@ -89,20 +80,11 @@ testMonad = do
isExistOp "key2" ?= True
createDirOp "dir1/"
isExistOp "dir1/" ?= True
- copyOp "key1" "key3"
- isExistOp "key1" ?= True
- isExistOp "key3" ?= True
- renameOp "key2" "key4"
- isExistOp "key2" ?= False
- isExistOp "key4" ?= True
statOp "key1" ?= except_meta
deleteOp "key1"
isExistOp "key1" ?= False
lister <- listOp "/"
liftIO $ findLister lister "key3" ?= True
- renameOp "key3" "/dir1/key5"
- lister2 <- scanOp "/"
- liftIO $ findLister lister2 "dir1/key5" ?= True
except_meta =
Metadata
{ mMode = File,
@@ -144,4 +126,4 @@ findLister lister key = do
case res of
Left _ -> return False
Right Nothing -> return False
- Right (Just k) -> if k == key then return True else findLister lister key
\ No newline at end of file
+ Right (Just k) -> if k == key then return True else findLister lister key
diff --git a/bindings/lua/test/opendal_test.lua b/bindings/lua/test/opendal_test.lua
index a6007bdc1..859ddc361 100644
--- a/bindings/lua/test/opendal_test.lua
+++ b/bindings/lua/test/opendal_test.lua
@@ -66,10 +66,6 @@ describe("opendal unit test", function()
local res, err = op:read("test.txt")
assert.is_nil(err)
assert.are.equal(res, "hello world")
- assert.is_nil(op:rename("test.txt", "test_1.txt"))
- assert.equal(op:is_exist("test_1.txt"), true)
- assert.equal(op:is_exist("test.txt"), false)
- assert.equal(op:is_exist("test_1.txt"), true)
assert.is_nil(op:delete("test_1.txt"))
assert.equal(op:is_exist("test_1.txt"), false)
end)
diff --git a/bindings/ocaml/test/test.ml b/bindings/ocaml/test/test.ml
index 0dc96a254..26a7b04d3 100644
--- a/bindings/ocaml/test/test.ml
+++ b/bindings/ocaml/test/test.ml
@@ -50,14 +50,6 @@ let test_block_write_and_read test_ctxt =
assert_equal "helloworld"
(data |> Array.to_seq |> Bytes.of_seq |> Bytes.to_string)
-let test_copy_and_read test_ctxt =
- let bo = new_test_block_operator test_ctxt in
- let data = "helloworld" in
- ignore (test_check_result (Operator.write bo "foo" (Bytes.of_string data)));
- ignore (test_check_result (Operator.copy bo "foo" "bar"));
- let got_res = test_check_result (Operator.read bo "bar") in
- assert_equal data (got_res |> Array.to_seq |> Bytes.of_seq |> Bytes.to_string)
-
let test_operator_reader test_ctxt =
let bo = new_test_block_operator test_ctxt in
ignore
@@ -105,7 +97,6 @@ let suite =
"test_new_block_operator" >:: test_new_block_operator;
"test_create_dir_and_remove_all" >:: test_create_dir_and_remove_all;
"test_block_write_and_read" >:: test_block_write_and_read;
- "test_copy_and_read" >:: test_copy_and_read;
"test_operator_reader" >:: test_operator_reader;
"test_operator_stat" >:: test_operator_stat;
"test_list" >:: test_list;