Skip to content

Commit

Permalink
[Enhance tests][Files & Directory scenarios] Test getting bucket when…
Browse files Browse the repository at this point in the history
… directory exists named with the same name as a bucket
  • Loading branch information
chushenmeshile authored and xiaozhu36 committed Jun 19, 2020
1 parent b0009fe commit 1e7f175
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions spec/fog/integration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,14 @@
end
end

it 'Should getting bucket when directory exists named with the same name as a bucket' do
system("aliyun oss mkdir oss://#{@conn.aliyun_oss_bucket}/#{@conn.aliyun_oss_bucket} > /dev/null")
files = @conn.directories.get(@conn.aliyun_oss_bucket).files
expect(files.length).to eq(1)
expect(files.get(@conn.aliyun_oss_bucket+"/").key).to eq(@conn.aliyun_oss_bucket+"/")
files[0].destroy
end

it 'test get file that not exists' do
directory = @conn.directories.get(@conn.aliyun_oss_bucket)
files = directory.files
Expand Down

0 comments on commit 1e7f175

Please sign in to comment.