2
2
mirror of https://github.com/octoleo/restic.git synced 2024-11-02 19:49:44 +00:00

backend tests: Test accessing config

This commit adds real testing for accessing the config file with
different names.
This commit is contained in:
Alexander Neumann 2016-02-21 16:02:13 +01:00
parent bd621197f8
commit f7a10a9b9c

View File

@ -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)
}