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

storage: Implement Copier and Mover tests #27

Merged
merged 2 commits into from
Jul 1, 2021
Merged

Conversation

JinnyYi
Copy link
Contributor

@JinnyYi JinnyYi commented Jul 1, 2021

close #26

utils.go Outdated Show resolved Hide resolved
copier.go Outdated Show resolved Hide resolved
copier.go Outdated Show resolved Hide resolved
copier.go Outdated Show resolved Hide resolved
mover.go Outdated Show resolved Hide resolved
mover.go Outdated Show resolved Hide resolved
@Xuanwo Xuanwo merged commit 5bb9b7f into master Jul 1, 2021
@Xuanwo Xuanwo deleted the copier-and-mover branch July 1, 2021 05:20
@zu1k
Copy link
Member

zu1k commented Jul 1, 2021

In the copy operation, do we need to check the existence of the source file?

@Xuanwo
Copy link
Contributor

Xuanwo commented Jul 1, 2021

In the copy operation, do we need to check the existence of the source file?

No, we don't need and we can't.

_, err := store.Stat(src)

Convey("The error should be ErrObjectNotExist", func() {
So(err, ShouldEqual, services.ErrObjectNotExist)
Copy link
Member

Choose a reason for hiding this comment

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

A bug?

So(errors.Is(err, services.ErrObjectNotExist), ShouldBeTrue)

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, it's indeed a bug. Would you like to propose a pr to fix it?

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.

[FEATURE] Add Copier and Mover tests
3 participants