tests: document why virgdbus must be mocked in networkxml2firewalltest.c

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>
This commit is contained in:
Laine Stump 2021-11-15 13:28:12 -05:00
parent f8151c637c
commit 3d37406626

View 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"))