-
Notifications
You must be signed in to change notification settings - Fork 1
Conversation
@@ -359,7 +428,11 @@ func (s *Storage) stat(ctx context.Context, path string, opt pairStorageStat) (o | |||
o = s.newObject(true) | |||
o.ID = rp | |||
o.Path = path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to trim the Path
trailing /
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’m confused about it. Is o.Path
not the path
passed in?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, in most time o.Path == path
.
But for dir object, we add /
after path test
and send real API to test/
. So after we got the information, we need to roll it back.
Maybe we could make it more clear by creating a new var: sp := path + "/"
.
In order to make this behavior works as expected, we can add check in go-integration-test
, make sure returning path
equals to input path
.
Ooooops, the path hasn't been updated. Current logic is correct.
tests/storage_test.go
Outdated
@@ -13,3 +13,19 @@ func TestStorage(t *testing.T) { | |||
} | |||
tests.TestStorager(t, setupTest(t)) | |||
} | |||
|
|||
// FIXME: For `CompleteMultipartUpload`, the numbers of the uploaded parts must be continuous and the part information entries in the request body must be sorted by number in ascending order |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's update tests intead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Already updated.
ref: #30
ref: beyondstorage/go-storage#560