mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: containerd: Fix test failure with Go 1.13.
* gnu/packages/docker.scm (containerd)[source]: Add patch. * gnu/packages/patches/containerd-test-with-go1.13.patch: New file. * gnu/local.mk (dist_patch_DATA): Add patch.
This commit is contained in:
parent
7d9f8db2a8
commit
13c8e747e8
3 changed files with 25 additions and 1 deletions
21
gnu/packages/patches/containerd-test-with-go1.13.patch
Normal file
21
gnu/packages/patches/containerd-test-with-go1.13.patch
Normal file
|
@ -0,0 +1,21 @@
|
|||
Compatibility fix for go 1.13, flag.Parse() shouldn't be called during
|
||||
package initialization.
|
||||
https://golang.org/doc/go1.13#testing
|
||||
--- a/client_test.go 2020-02-12 14:50:28.991245371 -0500
|
||||
+++ b/client_test.go 2020-02-12 15:12:37.383523980 -0500
|
||||
@@ -49,7 +49,6 @@
|
||||
flag.StringVar(&address, "address", defaultAddress, "The address to the containerd socket for use in the tests")
|
||||
flag.BoolVar(&noDaemon, "no-daemon", false, "Do not start a dedicated daemon for the tests")
|
||||
flag.BoolVar(&noCriu, "no-criu", false, "Do not run the checkpoint tests")
|
||||
- flag.Parse()
|
||||
}
|
||||
|
||||
func testContext() (context.Context, context.CancelFunc) {
|
||||
@@ -59,6 +58,7 @@
|
||||
}
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
+ flag.Parse()
|
||||
if testing.Short() {
|
||||
os.Exit(m.Run())
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue