mirror of
https://github.com/rclone/rclone.git
synced 2025-12-11 22:14:05 +01:00
core/command: Add streaming output for long running commands.
This commit is contained in:
committed by
Nick Craig-Wood
parent
1cae4152f9
commit
a9713cd0ed
@@ -3,6 +3,8 @@ package rc
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"os"
|
||||
"runtime"
|
||||
"testing"
|
||||
@@ -135,10 +137,13 @@ func TestCoreQuit(t *testing.T) {
|
||||
func TestCoreCommand(t *testing.T) {
|
||||
call := Calls.Get("core/command")
|
||||
|
||||
var httpResponse http.ResponseWriter = httptest.NewRecorder()
|
||||
|
||||
in := Params{
|
||||
"command": "version",
|
||||
"opt": map[string]string{},
|
||||
"arg": []string{},
|
||||
"command": "version",
|
||||
"opt": map[string]string{},
|
||||
"arg": []string{},
|
||||
"_response": &httpResponse,
|
||||
}
|
||||
got, err := call.Fn(context.Background(), in)
|
||||
require.NoError(t, err)
|
||||
|
||||
Reference in New Issue
Block a user