summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/restic-0.9.6-fix-tests-for-go1.15.patch
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2021-08-12 00:30:27 +0200
committerMarius Bakke <marius@gnu.org>2021-08-12 00:30:27 +0200
commitc4133c43c7cfe2476ebfae87f9e4d10d96de9bc7 (patch)
tree47bd773d2f434384b54e56916c1a287dd8e51511 /gnu/packages/patches/restic-0.9.6-fix-tests-for-go1.15.patch
parentffa01e68859bb7a6daa9fcffdc8d77ca35db4bc0 (diff)
parent4eb0a5146ae5a195a29c79f586fcc1e58f7fa69b (diff)
downloadguix-patches-c4133c43c7cfe2476ebfae87f9e4d10d96de9bc7.tar
guix-patches-c4133c43c7cfe2476ebfae87f9e4d10d96de9bc7.tar.gz
Merge branch 'master' into core-updates-frozen
Conflicts: gnu/packages/algebra.scm gnu/packages/games.scm gnu/packages/golang.scm gnu/packages/kerberos.scm gnu/packages/mail.scm gnu/packages/python.scm gnu/packages/ruby.scm gnu/packages/scheme.scm gnu/packages/tex.scm gnu/packages/tls.scm gnu/packages/version-control.scm
Diffstat (limited to 'gnu/packages/patches/restic-0.9.6-fix-tests-for-go1.15.patch')
-rw-r--r--gnu/packages/patches/restic-0.9.6-fix-tests-for-go1.15.patch51
1 files changed, 51 insertions, 0 deletions
diff --git a/gnu/packages/patches/restic-0.9.6-fix-tests-for-go1.15.patch b/gnu/packages/patches/restic-0.9.6-fix-tests-for-go1.15.patch
new file mode 100644
index 0000000000..cc510c1cfe
--- /dev/null
+++ b/gnu/packages/patches/restic-0.9.6-fix-tests-for-go1.15.patch
@@ -0,0 +1,51 @@
+This cherry-picked patch fixes tests for Go >= 1.15. Restic v0.10 (which
+includes this patch) requires go module support from the Go build system.
+Original patch follows.
+
+---
+From 97950ab81a18de06b95384da6d8646fef87c9d97 Mon Sep 17 00:00:00 2001
+From: Alexander Neumann <alexander@bumpern.de>
+Date: Sat, 12 Sep 2020 17:36:44 +0200
+Subject: [PATCH] options: Fix test for Go >= 1.15
+
+---
+ internal/options/options_test.go | 12 +++++++++---
+ 1 file changed, 9 insertions(+), 3 deletions(-)
+
+diff --git a/internal/options/options_test.go b/internal/options/options_test.go
+index de94fc90a1..8d268992a3 100644
+--- a/internal/options/options_test.go
++++ b/internal/options/options_test.go
+@@ -3,6 +3,7 @@ package options
+ import (
+ "fmt"
+ "reflect"
++ "regexp"
+ "testing"
+ "time"
+ )
+@@ -199,7 +200,7 @@ var invalidSetTests = []struct {
+ "timeout": "2134",
+ },
+ "ns",
+- `time: missing unit in duration 2134`,
++ `time: missing unit in duration "?2134"?`,
+ },
+ }
+
+@@ -212,8 +213,13 @@ func TestOptionsApplyInvalid(t *testing.T) {
+ t.Fatalf("expected error %v not found", test.err)
+ }
+
+- if err.Error() != test.err {
+- t.Fatalf("expected error %q, got %q", test.err, err.Error())
++ matched, err := regexp.MatchString(test.err, err.Error())
++ if err != nil {
++ t.Fatal(err)
++ }
++
++ if !matched {
++ t.Fatalf("expected error to match %q, got %q", test.err, err.Error())
+ }
+ })
+ }