diff options
author | Danny Milosavljevic <dannym@scratchpost.org> | 2019-01-07 20:01:34 +0100 |
---|---|---|
committer | Danny Milosavljevic <dannym@scratchpost.org> | 2019-01-10 02:49:14 +0100 |
commit | f87ea24a821c1cee8f9a8f0d38d7f02fa43d8383 (patch) | |
tree | c66f83ecd4c575eebd51a51c4e90142d7a96c55d /gnu/packages/patches | |
parent | fc51c28ae8172c9f4370772bd76601f89b9498e6 (diff) | |
download | guix-f87ea24a821c1cee8f9a8f0d38d7f02fa43d8383.tar.gz guix-f87ea24a821c1cee8f9a8f0d38d7f02fa43d8383.zip |
gnu: Add docker.
* gnu/packages/docker.scm (docker): New variable.
* gnu/packages/patches/docker-engine-test-noinstall.patch: New file.
* gnu/packages/patches/docker-fix-tests.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add them.
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r-- | gnu/packages/patches/docker-engine-test-noinstall.patch | 23 | ||||
-rw-r--r-- | gnu/packages/patches/docker-fix-tests.patch | 28 |
2 files changed, 51 insertions, 0 deletions
diff --git a/gnu/packages/patches/docker-engine-test-noinstall.patch b/gnu/packages/patches/docker-engine-test-noinstall.patch new file mode 100644 index 0000000000..85d56a3465 --- /dev/null +++ b/gnu/packages/patches/docker-engine-test-noinstall.patch @@ -0,0 +1,23 @@ +Last-Update: 2018-06-18 +Forwarded: not-needed +Author: Dmitry Smirnov <onlyjob@debian.org> +Description: prevents test-time installation that causes FTBFS. +~~~~ + go test net: open /usr/lib/go-1.10/pkg/linux_amd64/net.a: permission denied +~~~~ + +--- a/hack/test/unit ++++ b/hack/test/unit +@@ -18,12 +18,8 @@ + + exclude_paths="/vendor/|/integration" + pkg_list=$(go list $TESTDIRS | grep -vE "($exclude_paths)") + +-# install test dependencies once before running tests for each package. This +-# significantly reduces the runtime. +-go test -i "${BUILDFLAGS[@]}" $pkg_list +- + for pkg in $pkg_list; do + go test "${BUILDFLAGS[@]}" \ + -cover \ + -coverprofile=profile.out \ diff --git a/gnu/packages/patches/docker-fix-tests.patch b/gnu/packages/patches/docker-fix-tests.patch new file mode 100644 index 0000000000..3e3e318e25 --- /dev/null +++ b/gnu/packages/patches/docker-fix-tests.patch @@ -0,0 +1,28 @@ +Author: Danny Milosavljevic <dannym@scratchpost.org> +The socket name ended up too long inside the container. +Use a shorter one. +--- a/pkg/authorization/authz_unix_test.go 2019-01-10 01:55:02.997985947 +0100 ++++ b/pkg/authorization/authz_unix_test.go 2019-01-10 02:03:21.177439757 +0100 +@@ -24,7 +24,7 @@ + ) + + const ( +- pluginAddress = "authz-test-plugin.sock" ++ pluginAddress = "/tmp/authz-test-plugin.sock" + ) + + func TestAuthZRequestPluginError(t *testing.T) { +@@ -263,12 +263,7 @@ + + // createTestPlugin creates a new sample authorization plugin + func createTestPlugin(t *testing.T) *authorizationPlugin { +- pwd, err := os.Getwd() +- if err != nil { +- t.Fatal(err) +- } +- +- client, err := plugins.NewClient("unix:///"+path.Join(pwd, pluginAddress), &tlsconfig.Options{InsecureSkipVerify: true}) ++ client, err := plugins.NewClient("unix:///"+path.Join("/", pluginAddress), &tlsconfig.Options{InsecureSkipVerify: true}) + if err != nil { + t.Fatalf("Failed to create client %v", err) + } |