mirror of
https://github.com/restic/restic.git
synced 2025-08-12 07:37:40 +00:00
Fix inconsistency of saving/loading config file
Fix saving/loading config file: Always set ID to a zero ID.
This commit is contained in:

committed by
Alexander Weiss

parent
dd7b4f54f5
commit
d3c59d18e5
@@ -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")
|
||||
|
Reference in New Issue
Block a user