From 16b321b140113b8e973f08157269908811f2d2a4 Mon Sep 17 00:00:00 2001 From: Lars Lehtonen Date: Wed, 12 Feb 2020 13:32:45 -0800 Subject: [PATCH 1/4] internal/restic: fix dropped test error --- internal/restic/config_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/restic/config_test.go b/internal/restic/config_test.go index dd3ddcc74..506381965 100644 --- a/internal/restic/config_test.go +++ b/internal/restic/config_test.go @@ -36,6 +36,7 @@ func TestConfig(t *testing.T) { rtest.OK(t, err) _, err = saver(save).SaveJSONUnpacked(restic.ConfigFile, cfg1) + rtest.OK(t, err) load := func(ctx context.Context, tpe restic.FileType, id restic.ID, arg interface{}) error { rtest.Assert(t, tpe == restic.ConfigFile, From fea835b4e2e2651dc8e49615f306efb578da9990 Mon Sep 17 00:00:00 2001 From: Lars Lehtonen Date: Wed, 12 Feb 2020 13:33:54 -0800 Subject: [PATCH 2/4] internal/repository: fix dropped test error --- internal/repository/index_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/repository/index_test.go b/internal/repository/index_test.go index 599f243f3..d64e8585a 100644 --- a/internal/repository/index_test.go +++ b/internal/repository/index_test.go @@ -134,6 +134,7 @@ func TestIndexSerialize(t *testing.T) { id := restic.NewRandomID() rtest.OK(t, idx.SetID(id)) id2, err := idx.ID() + rtest.OK(t, err) rtest.Assert(t, id2.Equal(id), "wrong ID returned: want %v, got %v", id, id2) From 3ed54e762e1619db710fabcdb7b622894264dce6 Mon Sep 17 00:00:00 2001 From: Lars Lehtonen Date: Wed, 12 Feb 2020 13:36:21 -0800 Subject: [PATCH 3/4] internal/backend/sftp: fix dropped test error --- internal/backend/sftp/layout_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/backend/sftp/layout_test.go b/internal/backend/sftp/layout_test.go index 81e5f3240..99e18a746 100644 --- a/internal/backend/sftp/layout_test.go +++ b/internal/backend/sftp/layout_test.go @@ -60,6 +60,7 @@ func TestLayout(t *testing.T) { datafiles[fi.Name] = false return nil }) + rtest.OK(t, err) if len(datafiles) == 0 { t.Errorf("List() returned zero data files") From 72734d59b5a5512ac4e14f5839c3f65bb40ad9c8 Mon Sep 17 00:00:00 2001 From: Lars Lehtonen Date: Wed, 12 Feb 2020 13:37:37 -0800 Subject: [PATCH 4/4] internal/archiver: fix dropped error --- internal/archiver/archiver.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/archiver/archiver.go b/internal/archiver/archiver.go index 16dd76254..770a827bb 100644 --- a/internal/archiver/archiver.go +++ b/internal/archiver/archiver.go @@ -822,6 +822,10 @@ func (arch *Archiver) Snapshot(ctx context.Context, targets []string, opts Snaps } sn, err := restic.NewSnapshot(targets, opts.Tags, opts.Hostname, opts.Time) + if err != nil { + return nil, restic.ID{}, err + } + sn.Excludes = opts.Excludes if !opts.ParentSnapshot.IsNull() { id := opts.ParentSnapshot