GNU bug report logs - #54796
[PATCH v3 00/22] Add importer for hex.pm and rebar3 build-system for Erlang

Previous Next

Package: guix-patches;

Reported by: Hartmut Goebel <h.goebel <at> crazy-compilers.com>

Date: Fri, 8 Apr 2022 17:03:01 UTC

Severity: normal

Tags: patch

Done: Hartmut Goebel <h.goebel <at> crazy-compilers.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Maxime Devos <maximedevos <at> telenet.be>
To: Hartmut Goebel <h.goebel <at> crazy-compilers.com>, 54796 <at> debbugs.gnu.org
Subject: [bug#54796] [PATCH v3 01/22] import: Add hex.pm importer.
Date: Sat, 09 Apr 2022 14:07:23 +0200
[Message part 1 (text/plain, inline)]
Hartmut Goebel schreef op vr 08-04-2022 om 19:03 [+0200]:
> +(test-assert "hexpm->guix-package"
> +  ;; Replace network resources with sample data.
> +  (mock ((guix http-client) http-fetch
> +         (lambda (url . rest)
> +           (match url
> +             ("https://hex.pm/api/packages/bla"
> +              (values (open-input-string test-bla-package)
> +                      (string-length test-bla-package)))
> +             ("https://hex.pm/api/packages/bla/releases/1.5.0"
> +              (values (open-input-string test-bla-release)
> +                      (string-length test-bla-release)))
> +             (_ (error "http-fetch got unexpected URL: " url)))))

From what I've gathered, with-http-server and the like is preferred
above mocking, though with-http-server might need to be extended first
to allow checking the URL (see <https://issues.guix.gnu.org/53389>).

Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 2 years and 339 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.