Skip to content

Commit

Permalink
Add oss2
Browse files Browse the repository at this point in the history
  • Loading branch information
杨赫然 committed Oct 25, 2024
1 parent b6503ea commit 550b9a5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
2 changes: 1 addition & 1 deletion ci/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ requests>=2.31.0
pytest>=7.4.0
pytest-instafail
boto3==1.28.12
oss2
oss2==2.18.4
13 changes: 3 additions & 10 deletions tests/test_objwrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,6 @@ def read_and_write_client(client):
assert client.stat_raw(key2) == len(data2)
assert client.stat_raw(key3) == len(data3)

objs = client.list_objs()
num = 0
for obj in objs:
if obj[0] == '0e37678b-b0f2-4842-b671-207634c8c0af' or obj[0] == 'b999b39d-2749-44c9-a6b5-982b8bfb7a75':
num += 1
assert num == 3

objs = client.list_objs('0e37678b-b0f2-4842-b671-207634c8c0af')
num = 0
for obj in objs:
Expand All @@ -41,11 +34,11 @@ def read_and_write_client(client):
assert num == 1

raw = client.read_obj_raw (key1)
assert raw == data1
assert raw == data1.encode("utf-8")
raw = client.read_obj_raw (key2)
assert raw == data2
assert raw == data2.encode("utf-8")
raw = client.read_obj_raw (key3)
assert raw == data3
assert raw == data3.encode("utf-8")

client.remove_obj(key1)
assert client.obj_exists(key1) == False
Expand Down

0 comments on commit 550b9a5

Please sign in to comment.