summaryrefslogtreecommitdiff
path: root/gnu/tests
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2021-10-27 12:29:56 +0200
committerLudovic Courtès <ludo@gnu.org>2021-12-12 23:20:50 +0100
commitf73ba627abd46018da7f6f41ebd5efb99412cc54 (patch)
treea4ad531665ba0e71178cdf18bdb167cc8eb481f1 /gnu/tests
parent5967aee398c26a4814da1d8dba3f2dba84b06a4b (diff)
tests: Replace uses of deprecated 'static-networking-service'.
* gnu/tests/ganeti.scm (%ganeti-os): Replace call to 'static-networking-service' by instantiating STATIC-NETWORKING-SERVICE-TYPE. * gnu/tests/networking.scm (%test-static-networking) (%openvswitch-os, %dhcpd-os): Likewise.
Diffstat (limited to 'gnu/tests')
-rw-r--r--gnu/tests/ganeti.scm7
-rw-r--r--gnu/tests/networking.scm29
2 files changed, 20 insertions, 16 deletions
diff --git a/gnu/tests/ganeti.scm b/gnu/tests/ganeti.scm
index 5ac2fd48dd6..c29b885a5e6 100644
--- a/gnu/tests/ganeti.scm
+++ b/gnu/tests/ganeti.scm
@@ -59,11 +59,8 @@
59 (packages (append (list ganeti-instance-debootstrap ganeti-instance-guix) 59 (packages (append (list ganeti-instance-debootstrap ganeti-instance-guix)
60 %base-packages)) 60 %base-packages))
61 (services 61 (services
62 (append (list (static-networking-service "eth0" "10.0.2.15" 62 (append (list (service static-networking-service-type
63 #:netmask "255.255.255.0" 63 (list %qemu-static-networking))
64 #:gateway "10.0.2.2"
65 #:name-servers '("10.0.2.3"))
66
67 (service openssh-service-type 64 (service openssh-service-type
68 (openssh-configuration 65 (openssh-configuration
69 (permit-root-login 'prohibit-password))) 66 (permit-root-login 'prohibit-password)))
diff --git a/gnu/tests/networking.scm b/gnu/tests/networking.scm
index c66af279f24..246e0a15fa0 100644
--- a/gnu/tests/networking.scm
+++ b/gnu/tests/networking.scm
@@ -122,10 +122,8 @@
122 (value 122 (value
123 (let ((os (marionette-operating-system 123 (let ((os (marionette-operating-system
124 (simple-operating-system 124 (simple-operating-system
125 (static-networking-service "eth0" "10.0.2.15" 125 (service static-networking-service-type
126 #:netmask "255.255.255.0" 126 (list %qemu-static-networking)))
127 #:gateway "10.0.2.2"
128 #:name-servers '("10.0.2.2")))
129 #:imported-modules '((gnu services herd) 127 #:imported-modules '((gnu services herd)
130 (guix combinators))))) 128 (guix combinators)))))
131 (run-static-networking-test (virtual-machine os)))))) 129 (run-static-networking-test (virtual-machine os))))))
@@ -275,9 +273,13 @@ port 7, and a dict service on port 2628."
275(define %openvswitch-os 273(define %openvswitch-os
276 (operating-system 274 (operating-system
277 (inherit (simple-operating-system 275 (inherit (simple-operating-system
278 (static-networking-service "ovs0" "10.1.1.1" 276 (simple-service 'openswitch-networking
279 #:netmask "255.255.255.252" 277 static-networking-service-type
280 #:requirement '(openvswitch-configuration)) 278 (list (static-networking
279 (addresses (list (network-address
280 (value "10.1.1.1/24")
281 (device "ovs0"))))
282 (requirement '(openvswitch-configuration)))))
281 (service openvswitch-service-type) 283 (service openvswitch-service-type)
282 openvswitch-configuration-service)) 284 openvswitch-configuration-service))
283 ;; Ensure the interface name does not change depending on the driver. 285 ;; Ensure the interface name does not change depending on the driver.
@@ -392,10 +394,15 @@ subnet 192.168.1.0 netmask 255.255.255.0 {
392 394
393(define %dhcpd-os 395(define %dhcpd-os
394 (simple-operating-system 396 (simple-operating-system
395 (static-networking-service "ens3" "192.168.1.4" 397 (service static-networking-service-type
396 #:netmask "255.255.255.0" 398 (list (static-networking
397 #:gateway "192.168.1.1" 399 (addresses (list (network-address
398 #:name-servers '("192.168.1.2" "192.168.1.3")) 400 (value "192.168.1.4/24")
401 (device "ens3"))))
402 (routes (list (network-route
403 (destination "default")
404 (gateway "192.168.1.1"))))
405 (name-servers '("192.168.1.2" "192.168.1.3")))))
399 (service dhcpd-service-type dhcpd-v4-configuration))) 406 (service dhcpd-service-type dhcpd-v4-configuration)))
400 407
401(define (run-dhcpd-test) 408(define (run-dhcpd-test)