mirror of
https://github.com/restic/restic.git
synced 2025-12-04 02:41:52 +00:00
Fix ineffassign mistakes
This commit is contained in:
@@ -559,7 +559,7 @@ func TestBackupExclude(t *testing.T) {
|
||||
|
||||
opts.Excludes = []string{"*.tar.gz", "private/secret"}
|
||||
testRunBackup(t, []string{datadir}, opts, gopts)
|
||||
snapshots, snapshotID = lastSnapshot(snapshots, loadSnapshotMap(t, gopts))
|
||||
_, snapshotID = lastSnapshot(snapshots, loadSnapshotMap(t, gopts))
|
||||
files = testRunLs(t, gopts, snapshotID)
|
||||
Assert(t, !includes(files, filepath.Join(string(filepath.Separator), "testdata", "foo.tar.gz")),
|
||||
"expected file %q not in first snapshot, but it's included", "foo.tar.gz")
|
||||
|
||||
@@ -212,6 +212,10 @@ func TestApplyPolicy(t *testing.T) {
|
||||
|
||||
var want restic.Snapshots
|
||||
err = json.Unmarshal(buf, &want)
|
||||
if err != nil {
|
||||
t.Errorf("error unmarshalling golden file %v: %v", goldenFilename, err)
|
||||
continue
|
||||
}
|
||||
|
||||
if !reflect.DeepEqual(keep, want) {
|
||||
t.Errorf("test %v: wrong result, want:\n %v\ngot:\n %v", i, want, keep)
|
||||
|
||||
Reference in New Issue
Block a user