-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Get region support specified UC hosts and Client & List bucket suppor…
…t output file parts (#125)
- Loading branch information
1 parent
1d3fbec
commit 21ec012
Showing
10 changed files
with
157 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
//go:build integration | ||
// +build integration | ||
|
||
package storage | ||
|
||
import ( | ||
"context" | ||
"testing" | ||
) | ||
|
||
func TestList(t *testing.T) { | ||
ret, _, err := bucketManager.ListFilesWithContext(context.Background(), testBucket, | ||
ListInputOptionsLimit(1000), | ||
ListInputOptionsNeedParts(false), | ||
) | ||
if err != nil { | ||
t.Fatalf("List bucket files error: %v\n", err) | ||
} | ||
|
||
hasParts := false | ||
for _, item := range ret.Items { | ||
if len(item.Parts) > 0 { | ||
hasParts = true | ||
} | ||
} | ||
if hasParts { | ||
t.Fatal("list files: should no parts") | ||
} | ||
|
||
ret, _, err = bucketManager.ListFilesWithContext(context.Background(), testBucket, | ||
ListInputOptionsLimit(1000), | ||
ListInputOptionsNeedParts(true), | ||
) | ||
if err != nil { | ||
t.Fatalf("List bucket files error: %v\n", err) | ||
} | ||
|
||
hasParts = false | ||
for _, item := range ret.Items { | ||
if len(item.Parts) > 0 { | ||
hasParts = true | ||
} | ||
} | ||
if !hasParts { | ||
t.Fatal("list files: should parts") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters