mirror of
https://github.com/octoleo/restic.git
synced 2024-11-02 11:46:36 +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:
parent
bd621197f8
commit
f7a10a9b9c
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user