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 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()) } }) } u/system/shadow.scm?id=c76d0dbcba5ecce041506cc46be42be97a4f300c'>diff
path: root/gnu/system/shadow.scm
c/teams.scm: ... this. Adjust shebang. * .gitignore: No longer ignore it. * configure.ac: Do not process it with AC_CONFIG_FILES. Reported-by: Clément Lassieur <clement@lassieur.org> Fixes: https://issues.guix.gnu.org/66605 Change-Id: I7a01750c6c5f0696b6c36b1e6caa9389d9e6822c
AgeCommit message (Expand)Author
2019-04-23services: account: Make 'user-homes' a one-shot service....* gnu/system/shadow.scm (account-shepherd-service): Add 'one-shot?' field. Return #t from 'start'. Ludovic Courtès
2019-03-07activation: Build account databases with (gnu build accounts)....* gnu/build/activation.scm (enumerate, current-users, current-groups) (add-group, add-user, modify-user, ensure-user): Remove. (activate-users+groups)[touch, activate-user]: Remove. [make-home-directory]: New procedure. Rewrite in terms of 'user+group-databases', 'write-group', etc. * gnu/build/install.scm (directives): Remove "/root". * gnu/system/shadow.scm (account-activation): Remove (setenv "PATH" ...) expression, which is now unneeded. Ludovic Courtès
2019-03-07activation: Operate on <user-account> and <user-group> records....* gnu/system/accounts.scm (sexp->user-group, sexp->user-account): New procedures. * gnu/system/shadow.scm (account-activation): Call them in the arguments to 'activate-users+groups'. (account-shepherd-service): Likewise. * gnu/build/activation.scm (activate-users+groups): Expect a list of <user-account> and a list of <user-group>. Replace uses of 'match' on tuples with calls to record accessors. (activate-user-home): Likewise. Ludovic Courtès
2019-03-07system: Add (gnu system accounts)....The (gnu system accounts) module is meant to be used both on the build- and on the host-side. * gnu/system/shadow.scm <top level>: Call 'default-shell'. (<user-account>, <user-group>): Move to... * gnu/system/accounts.scm: ... here. New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add system/accounts.scm. Ludovic Courtès
2018-10-19system: Rename .zlogin to .zprofile....Reported by Meiyo Peng <meiyo.peng@gmail.com>. * gnu/system/shadow.scm (default-skeletons): Rename zlogin to zprofile. Chris Marusich
Maxim Cournoyer