aboutsummaryrefslogtreecommitdiff
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (tests services vpn)
  #:use-module (gnu packages vpn)
  #:use-module (gnu services vpn)
  #:use-module (guix gexp)
  #:use-module (ice-9 match)
  #:use-module (srfi srfi-1)
  #:use-module (srfi srfi-64))

;;; Commentary:
;;;
;;; Unit tests for the (gnu services vpn) module.
;;;
;;; Code:

;;; Access some internals for whitebox testing.
(define ipv4-address? (@@ (gnu services vpn) ipv4-address?))
(define ipv6-address? (@@ (gnu services vpn) ipv6-address?))
(define host-name? (@@ (gnu services vpn) host-name?))
(define endpoint-host-names
  (@@ (gnu services vpn) endpoint-host-names))

(test-begin "vpn-services")

(test-assert "ipv4-address?"
  (every ipv4-address?
         (list "192.95.5.67:1234"
               "10.0.0.1")))

(test-assert "ipv6-address?"
  (every ipv6-address?
         (list "[2001:db8::c05f:543]:2468"
               "2001:db8::c05f:543"
               "2001:db8:855b:0000:0000:0567:5673:23b5"
               "2001:db8:855b::0567:5673:23b5")))

(define %wireguard-peers
  (list (wireguard-peer
         (name "dummy1")
         (public-key "VlesLiEB5BFd//OD2ILKXviolfz+hodG6uZ+XjoalC8=")
         (endpoint "some.dynamic-dns.service:53281")
         (allowed-ips '()))
        (wireguard-peer
         (name "dummy2")
         (public-key "AlesLiEB5BFd//OD2ILKXviolfz+hodG6uZ+XgoalC9=")
         (endpoint "example.org")
         (allowed-ips '()))
        (wireguard-peer
         (name "dummy3")
         (public-key "BlesLiEB5BFd//OD2ILKXviolfz+hodG6uZ+XgoalC7=")
         (endpoint "10.0.0.7:7777")
         (allowed-ips '()))
        (wireguard-peer
         (name "dummy4")
         (public-key "ClesLiEB5BFd//OD2ILKXviolfz+hodG6uZ+XgoalC6=")
         (endpoint "[2345:0425:2CA1::0567:5673:23b5]:44444")
         (allowed-ips '()))))

(test-equal "endpoint-host-names"
  ;; The first element of the pair the public Wireguard key associated to a
  ;; host name.
  '(("VlesLiEB5BFd//OD2ILKXviolfz+hodG6uZ+XjoalC8=" .
     "some.dynamic-dns.service:53281")
    ("AlesLiEB5BFd//OD2ILKXviolfz+hodG6uZ+XgoalC9=" .
     "example.org"))
  (endpoint-host-names %wireguard-peers))

(test-end "vpn-services")
doc' with 'gtk-doc/stable'. * gnu/packages/glib.scm (glib-with-documentation): Likewise. * gnu/packages/mate.scm (mate-desktop, atril, caja-extensions) (mate-utils, eom, engrampa, pluma, mate-polkit) [native-inputs]: Likewise. * gnu/packages/messaging.scm (libgnt, loudmouth) [native-inputs]: Likewise. * gnu/packages/music.scm (denemo, gsequencer) [native-inputs]: Likewise. * gnu/packages/photo.scm (entangle) [native-inputs]: Likewise. * gnu/packages/security-token.scm (libu2f-host, libu2f-server) [native-inputs]: Likewise. * gnu/packages/wm.scm (keybinder, keybinder-3.0) [native-inputs]: Likewise. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Modified-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Change-Id: I6c647ff1394e0a48bef0e6fb1ae43533673f1d79 Maxime Devos 2024-08-10gnu: mate-control-center: Update to 1.28.0....* gnu/packages/mate.scm (mate-control-center): Update to 1.28.0. [inputs]: Add elogind, libappindicator, libgtop, and udisks. [arguments]: Add a phase to fake 'libelogind' as 'systemd'. Change-Id: I94158a4085b22a01bae113deb2bab0adf7ad63ed 宋文武 2024-08-10gnu: mate-system-monitor: Update to 1.28.1....* gnu/packages/mate.scm (mate-system-monitor): Update to 1.28.1. [arguments]: Pass "--enable-systemd=no" to configure-flags. Change-Id: Ibf3f4ca80abf4f5cd5a3eb4510adccad3d5e1fec 宋文武 2024-08-10gnu: mate: Add needed dconf-editor to inputs....* gnu/packages/mate.scm (mate-panel)[inputs]: Add dconf-editor. (mate)[inputs]: Add dconf-editor. Change-Id: Ib731e81d4aa6c148bf2dc390aebd8f2c1b8b5834 Signed-off-by: 宋文武 <iyzsong@member.fsf.org> Andy Tai 2024-08-10gnu: Add mozo....* gnu/packages/mate.scm (mozo): New variable. (mate)[inputs]: Add mozo. Change-Id: I317b3479b44b1b02abf814fa5b871faa436913a6 Signed-off-by: 宋文武 <iyzsong@member.fsf.org> Andy Tai 2024-08-10gnu: mate-common: Update to 1.28.0...* gnu/packages/mate.scm (mate-common): update to 1.28.0. Change-Id: I9312b620c8dfbf20a6d477b1e12636922cee667e Signed-off-by: 宋文武 <iyzsong@member.fsf.org> Andy Tai 2024-08-10gnu: atril: update to 1.28.0....* gnu/packages/mate.scm (atril): Update to 1.28.0. [inputs]: Add mate-desktop and startup-notification. Change-Id: I7e3bb4ca4ea8ab9351cff6a422e55bb2a20a86eb Signed-off-by: 宋文武 <iyzsong@member.fsf.org> Andy Tai 2024-08-10gnu: mate-power-manager: Update to 1.28.1....* gnu/packages/mate.scm (mate-power-manager): Update to 1.28.1. [inputs]: Add mate-desktop and startup-notification. Change-Id: I75ee24c0a8a961a43f405da0e5036e3ae0fa4f71 Signed-off-by: 宋文武 <iyzsong@member.fsf.org> Andy Tai 2024-08-10gnu: mate-polkit: Update to 1.28.1....* gnu/packages/mate.scm (mate-polkit): Update to 1.28.1. Change-Id: I479e7342ca616b3a7c57bb94beaf38c1452e97cf Signed-off-by: 宋文武 <iyzsong@member.fsf.org> Andy Tai 2024-08-10gnu: pluma: update to 1.28.0....* gnu/packages/mate.scm (pluma): Update to 1.28.0. [inputs]: Add mate-desktop and startup-notification. Change-Id: I62f75c46daaad85a44a68b11464d6ce439d5cc91 Signed-off-by: 宋文武 <iyzsong@member.fsf.org> Andy Tai 2024-08-10gnu: engrampa: Update to 1.28.1....* gnu/packages/mate.scm (engrampa): Update to 1.28.1. Change-Id: I8c328bf7caa188c123916bf56c2933bd1d3fc468 Signed-off-by: 宋文武 <iyzsong@member.fsf.org> Andy Tai 2024-08-10gnu: eom: Update to 1.28.0....* gnu/packages/mate.scm (eom): Update to 1.28.0. Change-Id: I30f60fd8cc5abdbe77c5fa48ef1780fc65072268 Signed-off-by: 宋文武 <iyzsong@member.fsf.org> Andy Tai 2024-08-10gnu: mate-utils: Update to 1.28.0....* gnu/packages/mate.scm (mate-utils): update to 1.28.0. [inputs]: Add mate-desktop and startup-notification. Change-Id: I6899ad33d1c22a97553399f07963c895486e3a1c Signed-off-by: 宋文武 <iyzsong@member.fsf.org> Andy Tai 2024-08-10gnu: mate-menus: Update to 1.28.0....* gnu/packages/mate.scm (mate-menus): Update to 1.28.0. Change-Id: Ib6e734fd2e9bffae881814e0f6c3d13bd0aa2f25 Signed-off-by: 宋文武 <iyzsong@member.fsf.org> Andy Tai 2024-08-10gnu: mate-screensaver: Update to 1.28.0....* gnu/packages/mate.scm (mate-screensaver): Update to 1.28.0. Change-Id: If592eb165725dd047dfaca47b1504afb347d1192 Signed-off-by: 宋文武 <iyzsong@member.fsf.org> Andy Tai 2024-08-10gnu: mate-backgrounds: Update to 1.28.0....* gnu/packages/mate.scm (mate-backgrounds): Update to 1.28.0. Change-Id: Idc262d84ec0568d67dfba2576859c14f6dfe91d7 Signed-off-by: 宋文武 <iyzsong@member.fsf.org> Andy Tai 2024-08-10gnu: mate-calc: Update to 1.28.0....* gnu/packages/mate.scm (mate-calc): Update to 1.28.0. Change-Id: I2b98ae286504380c8078b771d424b3cb484c0053 Signed-off-by: 宋文武 <iyzsong@member.fsf.org> Andy Tai 2024-08-10gnu: mate-user-guide: Update to 1.28.0...* gnu/packages/mate.scm (mate-user-guide): Update to 1.28.0. Change-Id: Ia2905afe3a61888f8743563c7699d491e1d47afd Signed-off-by: 宋文武 <iyzsong@member.fsf.org> Andy Tai 2024-08-10gnu: caja-extensions: update to 1.28.0....* gnu/packages/mate.scm (caja-extensions): Update to 1.28.0 [arguments]<#:configure-flags>: Disable AV support as needed gstreamer components are Rust packages not in Guix at this time. Change-Id: If48fcc79618654fd29ed6222517509224fa78e37 Signed-off-by: 宋文武 <iyzsong@member.fsf.org> Andy Tai 2024-08-10gnu: marco: Update to 1.28.1...* gnu/packages/mate.scm (marco): Update to 1.28.1. Change-Id: Iac0f89a980a0e4a49a4b3bff4e9e82815357dee5 Signed-off-by: 宋文武 <iyzsong@member.fsf.org> Andy Tai 2024-08-10gnu: caja: Update to 1.28.0....* gnu/packages/mate.scm (caja): Update to 1.28.0. Change-Id: Ief5c25b068c693c4f41b800ed163054afd04e34c Signed-off-by: 宋文武 <iyzsong@member.fsf.org> Andy Tai 2024-08-10gnu: mate-panel: Update to 1.28.2....* gnu/packages/mate.scm (mate-panel): Update to 1.28.2. Change-Id: I0f04112256e6c60eb58af91e78006c475fc79f2a Signed-off-by: 宋文武 <iyzsong@member.fsf.org> Andy Tai 2024-08-10gnu: mate-media: Update to 1.28.1....* gnu/packages/mate.scm (mate-media): Update to 1.28.1. Change-Id: I687c652052bd817055618d9ad944ecde0ba2ef19 Signed-off-by: 宋文武 <iyzsong@member.fsf.org> Andy Tai 2024-08-10gnu: mate-applets: Update to 1.28.0....* gnu/packages/mate.scm (mate-applets): Update to 1.28.0. [inputs]: Replace gtksourceview-3 with gtksourceview-4. Add mate-desktop. Change-Id: I6b5c62fa029d70e475a1acbb05e622a906de27a7 Signed-off-by: 宋文武 <iyzsong@member.fsf.org> Andy Tai 2024-08-10gnu: libmatekbd: update to 1.28.0....* gnu/packages/mate.scm (libmatekbd): Update to 1.28.0. Change-Id: I2a077abc25e499a4e07058164b83bb318e8185ec Signed-off-by: 宋文武 <iyzsong@member.fsf.org> Andy Tai 2024-08-10gnu: libmatemixer: Update to 1.28.0....* gnu/packages/mate.scm (libmatemixer): Update to 1.28.0. Change-Id: I05baa1aecb4bc40ba34ce59ae41e64e906eefda6 Signed-off-by: 宋文武 <iyzsong@member.fsf.org> Andy Tai 2024-08-10gnu: mate-settings-daemon: Update to 1.28.0....* gnu/packages/mate.scm (mate-settings-daemon): Update to 1.28.0. Change-Id: I299d8a244228c907a00e5b32c476e8edf402eb72 Signed-off-by: 宋文武 <iyzsong@member.fsf.org> Andy Tai 2024-08-10gnu: mate-session-manager: Update to 1.28.0....* gnu/packages/mate.scm (mate-session-manager): Update to 1.28.0. Change-Id: I095d797a1a9559390d47bb51d79c80f50ad85e1c Signed-off-by: 宋文武 <iyzsong@member.fsf.org> Andy Tai 2024-08-10gnu: mate-terminal: Update to 1.28.1....* gnu/packages/mate.scm (mate-terminal): Update to 1.28.1. Change-Id: I47965f2685aded9ea1391329ade7dc16cc816251 Signed-off-by: 宋文武 <iyzsong@member.fsf.org> Andy Tai 2024-08-10gnu: libmateweather: Update to 1.28.0....* gnu/packages/mate.scm (libmateweather): Update to 1.28.0 * gnu/packages/patches/libmateweather-use-TZDIR.patch: Remove patch. * gnu/local.mk (dist_patch_DATA): Unregister it. Change-Id: I7432dd65bcf00e9f44d610fad337b629714fb3d2 Signed-off-by: 宋文武 <iyzsong@member.fsf.org> Andy Tai 2024-08-10gnu: mate-desktop: Update to 1.28.2....* gnu/packages/mate.scm (mate-desktop): Update to 1.28.2. Change-Id: I79a8b8759284e517beeaad40b02e7f980fea9bb3 Signed-off-by: 宋文武 <iyzsong@member.fsf.org> Andy Tai 2024-08-10gnu: mate-icon-theme: Update to 1.28.0....* gnu/packages/mate.scm (mate-icon-theme): Update to 1.28.0. Change-Id: I3c918d83265b384b468c66f5d07f5e78d6ec6f8b Signed-off-by: 宋文武 <iyzsong@member.fsf.org> Andy Tai 2024-07-31gnu: mate-utils: Fix intermittent build failures....* gnu/packages/mate.scm (mate-utils)[arguments]<#:parallel-build>: Set to #f. Change-Id: I6cc4fd1e83ea250ed3a6450c98eccf7474848a5f Danny Milosavljevic 2024-05-13gnu: atril: Expand package description....* gnu/packages/mate.scm (atril)[description]: Expand with the upstream description. Change-Id: Ibd142094a5fbb4028613a03da0bd6de75cc9f6fe Efraim Flashner 2024-05-13gnu: atril: Remove input labels....* gnu/packages/mate.scm (atril)[native-inputs]: Remove package labels. [inputs]: Same. Change-Id: I9bdb69426d4b3285b09310642b881ac9bcee0d47 Efraim Flashner