-
Notifications
You must be signed in to change notification settings - Fork 2
test: Implement GSP-86 Add linker integration tests #40
Conversation
go.mod
Outdated
@@ -3,7 +3,7 @@ module github.com/beyondstorage/go-integration-test/v4 | |||
go 1.15 | |||
|
|||
require ( | |||
github.com/beyondstorage/go-storage/v4 v4.3.2 | |||
github.com/beyondstorage/go-storage/v4 v4.3.3-0.20210720033749-df6a96af6045 |
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.
ping @JinnyYi, Let's solve beyondstorage/go-storage#682 so that we can use it here.
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.
go-storage
v4.4.0 have been released.
I made some mistakes and tested symlink based on files in
|
Nice catch, maybe we need to add them in specs or update the rfc. |
Linker should also take #42 a look. |
linker.go
Outdated
}) | ||
} | ||
|
||
func TestLinkerWithVirtualLink(t *testing.T, store types.Storager) { |
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.
This function will be called by services that support overwrite
, like oss
. But actually symlink
is native support for oss
. So maybe the function name TestLinkerWithVirtualLink
is not suitable?
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.
How about using TestLinkerWithoutOverwrite
and TestLinkerWithOverWrite
as function names?
This PR lives so long. How about removing the parts we haven't agreed on yet and merge We can specify the corner case behavior later. |
OK |
linker.go
Outdated
|
||
Convey("Read should get path object data without error", func() { | ||
var buf bytes.Buffer | ||
n, err := store.Read(path, &buf) |
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.
LinkObject
is not readable, so we can't read from a link directly. Instead, we need to read from the link object's LinkTarget
.
Maybe we can remove tests about Read should get path object data without error
?
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.
Got it!
@abyss-w Hi, we will squash all commits while merging, so don't bother to do a force push here. |
ok, got it. |
ping @JinnyYi to take another look. |
Thank you for your patient and detailed work! |
test: Implement GSP-86 Add linker integration tests