1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
|
From: Sophie Brun <sophie@kali.org>
Date: Tue, 3 May 2022 14:18:01 +0200
Subject: Add *_help.*.snap to work with argparse in Python 3.10
argparse in Python 3.10 display the help output mentioning "options".
Previously it mentioned "optional arguments". The 4 tests
(test_root_help, test_socket_help, test_ssh_help, test_tls_help) compare the
output and fail because of this difference.
---
tests/root_help.snap | 2 +-
tests/socket_help.snap | 2 +-
tests/ssh_help.snap | 2 +-
tests/tls_help.snap | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/tests/root_help.snap b/tests/root_help.snap
index c8541e8..4c923c3 100644
--- a/tests/root_help.snap
+++ b/tests/root_help.snap
@@ -4,7 +4,7 @@ usage: gvm-test-cli [-h] [-c [CONFIG]]
[--gmp-password GMP_PASSWORD] [-V]
CONNECTION_TYPE ...
-optional arguments:
+options:
-h, --help show this help message and exit
-c [CONFIG], --config [CONFIG]
Configuration file path (default: ~/.config/gvm-
diff --git a/tests/socket_help.snap b/tests/socket_help.snap
index 570b7b4..57b69ae 100644
--- a/tests/socket_help.snap
+++ b/tests/socket_help.snap
@@ -1,7 +1,7 @@
usage: gvm-test-cli socket [-h] [--sockpath [SOCKETPATH] | --socketpath
[SOCKETPATH]]
-optional arguments:
+options:
-h, --help show this help message and exit
--sockpath [SOCKETPATH]
Deprecated, use --socketpath instead
diff --git a/tests/ssh_help.snap b/tests/ssh_help.snap
index ee28ea0..523e1c0 100644
--- a/tests/ssh_help.snap
+++ b/tests/ssh_help.snap
@@ -2,7 +2,7 @@ usage: gvm-test-cli ssh [-h] [--hostname HOSTNAME] [--port PORT]
[--ssh-username SSH_USERNAME]
[--ssh-password SSH_PASSWORD] [-A]
-optional arguments:
+options:
-h, --help show this help message and exit
--hostname HOSTNAME Hostname or IP address (default: 127.0.0.1)
--port PORT SSH port (default: 22)
diff --git a/tests/tls_help.snap b/tests/tls_help.snap
index 920dae0..752c3e1 100644
--- a/tests/tls_help.snap
+++ b/tests/tls_help.snap
@@ -2,7 +2,7 @@ usage: gvm-test-cli tls [-h] [--hostname HOSTNAME] [--port PORT]
[--certfile CERTFILE] [--keyfile KEYFILE]
[--cafile CAFILE] [--no-credentials]
-optional arguments:
+options:
-h, --help show this help message and exit
--hostname HOSTNAME Hostname or IP address (default: 127.0.0.1)
--port PORT GMP/OSP port (default: 9390)
|