Skip to content
This repository has been archived by the owner on Oct 14, 2021. It is now read-only.

Split TestCopier and TestMover #42

Merged
merged 4 commits into from
Jul 26, 2021
Merged

Split TestCopier and TestMover #42

merged 4 commits into from
Jul 26, 2021

Conversation

JinnyYi
Copy link
Contributor

@JinnyYi JinnyYi commented Jul 23, 2021

ref: #39

copier.go Outdated
})
}

func TestCopierWithDir(t *testing.T, store types.Storager) {
TestCopier(t, store)
Copy link
Contributor

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 {
Copy link
Contributor

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.

Copy link
Contributor Author

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 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

copier.go Outdated Show resolved Hide resolved
copier.go Outdated
c, ok := store.(types.Copier)
So(ok, ShouldBeTrue)

d, _ := store.(types.Direr)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

JinnyYi and others added 2 commits July 26, 2021 10:34
Co-authored-by: Xuanwo <github@xuanwo.io>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants