From 113624691ae194b8a1149a9d6d142e227feddefe Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Tue, 29 Dec 2015 00:17:39 +0000 Subject: [PATCH] Add -dump-headers and -dump-bodies flags for operations test debugging --- fs/operations_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fs/operations_test.go b/fs/operations_test.go index 625a67a3f..e45f27095 100644 --- a/fs/operations_test.go +++ b/fs/operations_test.go @@ -38,6 +38,8 @@ var ( RemoteName = flag.String("remote", "", "Remote to test with, defaults to local filesystem") SubDir = flag.Bool("subdir", false, "Set to test with a sub directory") Verbose = flag.Bool("verbose", false, "Set to enable logging") + DumpHeaders = flag.Bool("dump-headers", false, "Set to dump headers (needs -verbose)") + DumpBodies = flag.Bool("dump-bodies", false, "Set to dump bodies (needs -verbose)") finalise func() ) @@ -68,6 +70,8 @@ func TestInit(t *testing.T) { fs.LoadConfig() fs.Config.Verbose = *Verbose fs.Config.Quiet = !*Verbose + fs.Config.DumpHeaders = *DumpHeaders + fs.Config.DumpBodies = *DumpBodies var err error fremote, finalise, err = fstest.RandomRemote(*RemoteName, *SubDir) if err != nil {