guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

06/13: gnu: go-github-com-masterminds-sprig-v3: Enable tests.


From: guix-commits
Subject: 06/13: gnu: go-github-com-masterminds-sprig-v3: Enable tests.
Date: Fri, 28 Jun 2024 10:40:26 -0400 (EDT)

sharlatan pushed a commit to branch master
in repository guix.

commit d9f720b7ef34934f8964c1a3879b5aab3a09bbd1
Author: Sharlatan Hellseher <sharlatanus@gmail.com>
AuthorDate: Tue Jun 18 17:56:42 2024 +0100

    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
---
 gnu/packages/golang-xyz.scm | 11 +++++++++--
 1 file 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]