-
Notifications
You must be signed in to change notification settings - Fork 2
Conversation
copier.go
Outdated
}) | ||
} | ||
|
||
func TestCopierWithDir(t *testing.T, store types.Storager) { | ||
TestCopier(t, store) |
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 let the service call the TestCopier
?
copier.go
Outdated
func TestCopierWithDir(t *testing.T, store types.Storager) { | ||
TestCopier(t, store) | ||
|
||
if d, ok := store.(types.Direr); ok { |
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.
The check is not needed, as it's a service duty.
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.
copier.go
Outdated
func TestCopierWithVirtualDir(t *testing.T, store types.Storager) { | ||
TestCopier(t, store) | ||
|
||
if d, ok := store.(types.Direr); ok { |
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.
ditto
copier.go
Outdated
c, ok := store.(types.Copier) | ||
So(ok, ShouldBeTrue) | ||
|
||
d, _ := store.(types.Direr) |
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.
ditto
Co-authored-by: Xuanwo <github@xuanwo.io>
ref: #39