]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
tests: document why virgdbus must be mocked in networkxml2firewalltest.c
authorLaine Stump <laine@redhat.com>
Mon, 15 Nov 2021 18:28:12 +0000 (13:28 -0500)
committerLaine Stump <laine@redhat.com>
Mon, 13 Dec 2021 18:37:31 +0000 (13:37 -0500)
It isn't intuitive (to me) that a test just converting xml text into
iptables commands should need to call dbus, so rather than forcing the
next person to look through the commit logs and/or run the test under
gdb to understand why this is needed, just add a short comment in the
source.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
tests/networkxml2firewalltest.c

index e4f86bc3fc052d65650705b15660b74b98ccd601..68a82e60d6816c1117bab7ef4c4ed21b69a0816d 100644 (file)
@@ -187,6 +187,12 @@ mymain(void)
     return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
 }
 
+/* NB: virgdbus must be mocked because this test calls
+ * networkAddFirewallRules(), which will always call
+ * virFirewallDIsRegistered(), which calls
+ * virGDBusIsServiceRegistered().
+ */
+
 VIR_TEST_MAIN_PRELOAD(mymain, VIR_TEST_MOCK("virgdbus"),
                       VIR_TEST_MOCK("virfirewall"))