Fix inconsistency of saving/loading config file

Fix saving/loading config file: Always set ID to a zero ID.
This commit is contained in:
Alexander Weiss
2019-12-05 14:29:34 +01:00
committed by Alexander Weiss
parent dd7b4f54f5
commit d3c59d18e5
3 changed files with 19 additions and 3 deletions

View File

@@ -274,6 +274,14 @@ func TestLoadJSONUnpacked(t *testing.T) {
rtest.Equals(t, sn.Hostname, sn2.Hostname)
rtest.Equals(t, sn.Username, sn2.Username)
var cf restic.Config
// load and check Config
err = repo.LoadJSONUnpacked(context.TODO(), restic.ConfigFile, id, &cf)
rtest.OK(t, err)
rtest.Equals(t, cf.ChunkerPolynomial, repository.TestChunkerPol)
}
var repoFixture = filepath.Join("testdata", "test-repo.tar.gz")