plugins: Create plugins files only if webui is enabled. Fixes #4592. May fix #4600.

This commit is contained in:
negative0
2020-09-18 00:36:51 +05:30
committed by Nick Craig-Wood
parent be19d6a403
commit ed7af3f370
4 changed files with 66 additions and 18 deletions

View File

@@ -9,6 +9,7 @@ import (
"testing"
"github.com/rclone/rclone/fs/rc"
"github.com/rclone/rclone/fs/rc/rcflags"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
@@ -18,6 +19,10 @@ const testPluginAuthor = "rclone"
const testPluginKey = testPluginAuthor + "/" + testPluginName
const testPluginURL = "https://github.com/" + testPluginAuthor + "/" + testPluginName + "/"
func init() {
rcflags.Opt.WebUI = true
}
func setCacheDir(t *testing.T) string {
cacheDir, err := ioutil.TempDir("", "rclone-cache-dir")
assert.Nil(t, err)