From f7a10a9b9c93d43d1b821d3860cf01cb54ea5409 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sun, 21 Feb 2016 16:02:13 +0100 Subject: [PATCH] backend tests: Test accessing config This commit adds real testing for accessing the config file with different names. --- src/restic/backend/test/tests.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/restic/backend/test/tests.go b/src/restic/backend/test/tests.go index 6313f39f6..60c35ffb0 100644 --- a/src/restic/backend/test/tests.go +++ b/src/restic/backend/test/tests.go @@ -164,7 +164,8 @@ func TestConfig(t testing.TB) { // try accessing the config with different names, should all return the // same config for _, name := range []string{"", "foo", "bar", "0000000000000000000000000000000000000000000000000000000000000000"} { - buf, err := backend.LoadAll(b, backend.Handle{Type: backend.Config}, nil) + h := backend.Handle{Type: backend.Config, Name: name} + buf, err := backend.LoadAll(b, h, nil) if err != nil { t.Fatalf("unable to read config with name %q: %v", name, err) }