forked from TrueCloudLab/restic
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
1 changed files with 2 additions and 1 deletions
|
@ -164,7 +164,8 @@ func TestConfig(t testing.TB) {
|
||||||
// try accessing the config with different names, should all return the
|
// try accessing the config with different names, should all return the
|
||||||
// same config
|
// same config
|
||||||
for _, name := range []string{"", "foo", "bar", "0000000000000000000000000000000000000000000000000000000000000000"} {
|
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 {
|
if err != nil {
|
||||||
t.Fatalf("unable to read config with name %q: %v", name, err)
|
t.Fatalf("unable to read config with name %q: %v", name, err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue