]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virnetsockettest: Allow changing the proxy parameter
authorAndrea Bolognani <abologna@redhat.com>
Fri, 11 Feb 2022 17:10:32 +0000 (18:10 +0100)
committerAndrea Bolognani <abologna@redhat.com>
Mon, 14 Feb 2022 10:32:15 +0000 (11:32 +0100)
Currently the test cases all follow the proxy=auto behavior, but
we want to add coverage for other proxy modes as well.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
tests/virnetsockettest.c

index 6ae21155b386e0e301c384f8770693647cc870e0..fc58742329bab1d91b9c06ceae3ed3bc99b9d20c 100644 (file)
@@ -441,6 +441,7 @@ struct testSSHData {
     const char *username;
     bool noTTY;
     bool noVerify;
+    virNetClientProxy proxy;
     const char *netcat;
     const char *keyfile;
     const char *path;
@@ -456,7 +457,7 @@ static int testSocketSSH(const void *opaque)
     virNetSocket *csock = NULL; /* Client socket */
     int ret = -1;
     char buf[1024];
-    g_autofree char *command = virNetClientSSHHelperCommand(VIR_NET_CLIENT_PROXY_AUTO,
+    g_autofree char *command = virNetClientSSHHelperCommand(data->proxy,
                                                             data->netcat,
                                                             data->path,
                                                             "qemu:///session",