Signed-off-by: Milos Gajdos <milosthegajdos@gmail.com>
This commit is contained in:
Milos Gajdos 2022-04-09 12:31:27 +01:00
parent 8eab5d1bd6
commit 48f3d9ad29
No known key found for this signature in database
GPG key ID: 01300E5E6D417439

View file

@ -824,9 +824,9 @@ func TestListObjectsV2(t *testing.T) {
t.Fatalf("unexpected list result") t.Fatalf("unexpected list result")
} }
var walkPathes []string var walkPaths []string
if err := d.Walk(ctx, prefix, func(fileInfo storagedriver.FileInfo) error { if err := d.Walk(ctx, prefix, func(fileInfo storagedriver.FileInfo) error {
walkPathes = append(walkPathes, fileInfo.Path()) walkPaths = append(walkPaths, fileInfo.Path())
if fileInfo.Path() == path.Dir(subDirPath) { if fileInfo.Path() == path.Dir(subDirPath) {
if !fileInfo.IsDir() { if !fileInfo.IsDir() {
t.Fatalf("unexpected walking file info") t.Fatalf("unexpected walking file info")
@ -842,10 +842,10 @@ func TestListObjectsV2(t *testing.T) {
} }
subPaths = append(subPaths, subDirPath) subPaths = append(subPaths, subDirPath)
sort.Strings(walkPathes) sort.Strings(walkPaths)
sort.Strings(subPaths) sort.Strings(subPaths)
if !reflect.DeepEqual(subPaths, walkPathes) { if !reflect.DeepEqual(subPaths, walkPaths) {
t.Fatalf("unexpected walking pathes") t.Fatalf("unexpected walking paths")
} }
if err := d.Delete(ctx, prefix); err != nil { if err := d.Delete(ctx, prefix); err != nil {