summary refs log tree commit diff
diff options
context:
space:
mode:
authorSharlatan Hellseher <sharlatanus@gmail.com>2024-06-18 17:56:42 +0100
committerSharlatan Hellseher <sharlatanus@gmail.com>2024-06-28 15:15:31 +0100
commitd9f720b7ef34934f8964c1a3879b5aab3a09bbd1 (patch)
tree9ff10f3e31ae7b945d826dcd26ceba271606ce41
parent1afefe0f0f454aa7b61d5b584474186bc7af28d3 (diff)
downloadguix-d9f720b7ef34934f8964c1a3879b5aab3a09bbd1.tar.gz
gnu: go-github-com-masterminds-sprig-v3: Enable tests.
* gnu/packages/golang-xyz.scm (go-github-com-masterminds-sprig-v3)
[arguments]: <#:tests?>: Enable them.
<#:phases>: Add 'remove-network-tests phase.

Change-Id: I526f8c7d273ea3d88f8844da97293a1080471c62
-rw-r--r--gnu/packages/golang-xyz.scm11
1 files changed, 9 insertions, 2 deletions
diff --git a/gnu/packages/golang-xyz.scm b/gnu/packages/golang-xyz.scm
index 786ab1d200..ca48d5ed6c 100644
--- a/gnu/packages/golang-xyz.scm
+++ b/gnu/packages/golang-xyz.scm
@@ -2359,8 +2359,15 @@ implementing features like:
     (build-system go-build-system)
     (arguments
      (list
-      #:tests? #f ;network tests only
-      #:import-path "github.com/Masterminds/sprig/v3"))
+      #:import-path "github.com/Masterminds/sprig/v3"
+      #:phases
+      #~(modify-phases %standard-phases
+          ;; Tests tries to reach Google:
+          ;; tpl := `{{"www.google.com" | getHostByName}}`
+          (add-after 'unpack 'remove-network-tests
+            (lambda* (#:key import-path #:allow-other-keys)
+              (delete-file
+               (string-append "src/" import-path "/network_test.go")))))))
     (native-inputs
      (list go-github-com-stretchr-testify))
     (propagated-inputs