[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/02: tests: libvirt: Ensure the default network can be started.
From: |
guix-commits |
Subject: |
02/02: tests: libvirt: Ensure the default network can be started. |
Date: |
Mon, 29 Aug 2022 15:17:11 -0400 (EDT) |
mbakke pushed a commit to branch master
in repository guix.
commit 3e0abde17be944153be57ab5faeefc645266d39d
Author: Marius Bakke <marius@gnu.org>
AuthorDate: Mon Aug 29 20:08:38 2022 +0200
tests: libvirt: Ensure the default network can be started.
* gnu/tests/virtualization.scm (run-libvirt-test): Run commands to create
and
start the default network.
---
gnu/packages/virtualization.scm | 2 +-
gnu/tests/virtualization.scm | 20 ++++++++++++++++++++
2 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm
index 005421aaec..73e6f89166 100644
--- a/gnu/packages/virtualization.scm
+++ b/gnu/packages/virtualization.scm
@@ -14,7 +14,7 @@
;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
;;; Copyright © 2020, 2021 Brice Waegeneire <brice@waegenei.re>
;;; Copyright © 2020 Mathieu Othacehe <m.othacehe@gmail.com>
-;;; Copyright © 2020, 2021 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2020, 2021, 2022 Marius Bakke <marius@gnu.org>
;;; Copyright © 2020, 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2020 Brett Gilio <brettg@gnu.org>
;;; Copyright © 2021 Leo Famulari <leo@famulari.name>
diff --git a/gnu/tests/virtualization.scm b/gnu/tests/virtualization.scm
index 4bd56e5d9d..557f30db4f 100644
--- a/gnu/tests/virtualization.scm
+++ b/gnu/tests/virtualization.scm
@@ -106,6 +106,26 @@
"-c" "qemu:///system" "connect"))
marionette))
+ (test-eq "create default network"
+ 0
+ (marionette-eval
+ '(begin
+ (chdir "/tmp")
+ (system* #$(file-append libvirt "/bin/virsh")
+ "-c" "qemu:///system" "net-define"
+ #$(file-append libvirt
+
"/etc/libvirt/qemu/networks/default.xml")))
+ marionette))
+
+ (test-eq "start default network"
+ 0
+ (marionette-eval
+ '(begin
+ (chdir "/tmp")
+ (system* #$(file-append libvirt "/bin/virsh")
+ "-c" "qemu:///system" "net-start" "default"))
+ marionette))
+
(test-end))))
(gexp->derivation "libvirt-test" test))