From 2e6ef4f6ec3e9f53d86ce77a5703c81858a28635 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Thu, 10 Jan 2019 10:59:32 +0000 Subject: [PATCH] test_all: fix run with -remotes that aren't in the config file --- fstest/test_all/config.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/fstest/test_all/config.go b/fstest/test_all/config.go index 9ee9fa09d..5bacc65c7 100644 --- a/fstest/test_all/config.go +++ b/fstest/test_all/config.go @@ -9,6 +9,7 @@ import ( "log" "path" + "github.com/ncw/rclone/fs" "github.com/pkg/errors" yaml "gopkg.in/yaml.v2" ) @@ -119,7 +120,12 @@ func (c *Config) filterBackendsByRemotes(remotes []string) { } if !found { log.Printf("Remote %q not found - inserting with default flags", name) - newBackends = append(newBackends, Backend{Remote: name}) + // Lookup which backend + fsInfo, _, _, _, err := fs.ConfigFs(name) + if err != nil { + log.Fatalf("couldn't find remote %q: %v", name, err) + } + newBackends = append(newBackends, Backend{Backend: fsInfo.FileName(), Remote: name}) } } c.Backends = newBackends