core/command: Add version command instead of ls

This commit is contained in:
Chaitanya Bankanhal 2020-07-15 00:01:41 +05:30 committed by Nick Craig-Wood
parent 5549fd25fc
commit 54fc2821cd

View File

@ -5,8 +5,6 @@ import (
"runtime" "runtime"
"testing" "testing"
"github.com/rclone/rclone/fstest"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
@ -125,17 +123,11 @@ func TestCoreQuit(t *testing.T) {
// core/command: Runs a raw rclone command // core/command: Runs a raw rclone command
func TestCoreCommand(t *testing.T) { func TestCoreCommand(t *testing.T) {
call := Calls.Get("core/command") call := Calls.Get("core/command")
r := fstest.NewRun(t)
defer r.Finalise()
in := Params{ in := Params{
"command": "ls", "command": "version",
"opt": map[string]string{ "opt": map[string]string{},
"max-depth": "1", "arg": []string{},
},
"arg": []string{
r.FremoteName,
},
} }
got, err := call.Fn(context.Background(), in) got, err := call.Fn(context.Background(), in)
require.NoError(t, err) require.NoError(t, err)