operations: move interface assertion to tests to remove pflag dependency #3792

This commit is contained in:
Nick Craig-Wood
2019-12-10 13:28:56 +00:00
parent a4bc4daf30
commit 11f501bd44
2 changed files with 4 additions and 4 deletions

View File

@@ -10,10 +10,14 @@ import (
"github.com/rclone/rclone/fs/operations"
"github.com/rclone/rclone/fs/walk"
"github.com/rclone/rclone/fstest"
"github.com/spf13/pflag"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
// Check flag satisfies the interface
var _ pflag.Value = (*operations.DeduplicateMode)(nil)
func skipIfCantDedupe(t *testing.T, f fs.Fs) {
if !f.Features().DuplicateFiles {
t.Skip("Can't test deduplicate - no duplicate files possible")