mirror of
https://github.com/rclone/rclone.git
synced 2025-12-11 22:14:05 +01:00
rc: added command core/quit
This commit is contained in:
committed by
Nick Craig-Wood
parent
9cb549a227
commit
0c265713fd
@@ -5,11 +5,12 @@ import (
|
||||
"runtime"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/rclone/rclone/fs"
|
||||
"github.com/rclone/rclone/fs/config/obscure"
|
||||
"github.com/rclone/rclone/fs/version"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestInternalNoop(t *testing.T) {
|
||||
@@ -107,3 +108,14 @@ func TestCoreObscure(t *testing.T) {
|
||||
require.NotNil(t, out)
|
||||
assert.Equal(t, in["clear"], obscure.MustReveal(out["obscured"].(string)))
|
||||
}
|
||||
|
||||
func TestCoreQuit(t *testing.T) {
|
||||
//The call should return an error if param exitCode is not parsed to int
|
||||
call := Calls.Get("core/quit")
|
||||
assert.NotNil(t, call)
|
||||
in := Params{
|
||||
"exitCode": "potato",
|
||||
}
|
||||
_, err := call.Fn(context.Background(), in)
|
||||
require.Error(t, err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user