From 31d9bcf2764e57cf9d286087770bf7a29d965e7d Mon Sep 17 00:00:00 2001 From: Dheyay Date: Fri, 26 Jan 2024 14:02:13 -0800 Subject: [PATCH] collect-logs: update default output file to pro_logs.tar.gz Fixes: #2849 --- debian/po/pt_BR.po | 4 ++-- debian/po/ubuntu-pro.pot | 2 +- features/collect_logs.feature | 8 ++++---- features/logs.feature | 4 ++-- uaclient/cli/__init__.py | 2 +- uaclient/cli/tests/test_cli_collect_logs.py | 2 +- uaclient/messages/__init__.py | 2 +- ubuntu-advantage.1 | 2 +- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/debian/po/pt_BR.po b/debian/po/pt_BR.po index 91e3e2e256..f68087c7d0 100644 --- a/debian/po/pt_BR.po +++ b/debian/po/pt_BR.po @@ -1665,8 +1665,8 @@ msgid "Collect logs and relevant system information into a tarball." msgstr "Coleta logs e outras informações relevantes do sistema em um tarball." #: ../../uaclient/messages/__init__.py:898 -msgid "tarball where the logs will be stored. (Defaults to ./ua_logs.tar.gz)" -msgstr "tarball onde os logs serão guardados. (Valor padrão ./ua_logs.tar.gz)" +msgid "tarball where the logs will be stored. (Defaults to ./pro_logs.tar.gz)" +msgstr "tarball onde os logs serão guardados. (Valor padrão ./pro_logs.tar.gz)" #: ../../uaclient/messages/__init__.py:901 msgid "Show customizable configuration settings" diff --git a/debian/po/ubuntu-pro.pot b/debian/po/ubuntu-pro.pot index 379b879b15..90b435ca2f 100644 --- a/debian/po/ubuntu-pro.pot +++ b/debian/po/ubuntu-pro.pot @@ -1437,7 +1437,7 @@ msgid "Collect logs and relevant system information into a tarball." msgstr "" #: ../../uaclient/messages/__init__.py:898 -msgid "tarball where the logs will be stored. (Defaults to ./ua_logs.tar.gz)" +msgid "tarball where the logs will be stored. (Defaults to ./pro_logs.tar.gz)" msgstr "" #: ../../uaclient/messages/__init__.py:901 diff --git a/features/collect_logs.feature b/features/collect_logs.feature index 666b1d95db..fd0832a56b 100644 --- a/features/collect_logs.feature +++ b/features/collect_logs.feature @@ -7,8 +7,8 @@ Feature: Command behaviour when attached to an Ubuntu Pro subscription When I run `touch /var/log/ubuntu-advantage.log.1` with sudo When I run `touch /var/log/ubuntu-advantage.log.2.gz` with sudo When I run `pro collect-logs` as non-root - Then I verify that files exist matching `ua_logs.tar.gz` - When I run `tar zxf ua_logs.tar.gz` with sudo + Then I verify that files exist matching `pro_logs.tar.gz` + When I run `tar zxf pro_logs.tar.gz` with sudo Then I verify that files exist matching `logs/` When I run `sh -c "ls -1 logs/ | sort -d"` as non-root # On Xenial, the return value for inexistent services is the same as for dead ones (3). @@ -53,8 +53,8 @@ Feature: Command behaviour when attached to an Ubuntu Pro subscription When I run `touch /var/log/ubuntu-advantage.log.1` with sudo When I run `touch /var/log/ubuntu-advantage.log.2.gz` with sudo When I run `pro collect-logs` as non-root - Then I verify that files exist matching `ua_logs.tar.gz` - When I run `tar zxf ua_logs.tar.gz` as non-root + Then I verify that files exist matching `pro_logs.tar.gz` + When I run `tar zxf pro_logs.tar.gz` as non-root Then I verify that files exist matching `logs/` When I run `sh -c "ls -1 logs/ | sort -d"` as non-root # On Xenial, the return value for inexistent services is the same as for dead ones (3). diff --git a/features/logs.feature b/features/logs.feature index 2908600c8e..b317af6faf 100644 --- a/features/logs.feature +++ b/features/logs.feature @@ -61,14 +61,14 @@ Feature: Logs in Json Array Formatter Given a `` `` machine with ubuntu-advantage-tools installed When i verify that running `pro status` `with sudo` exits `0` And I verify that running `pro collect-logs` `with sudo` exits `0` - And I run `tar -tf ua_logs.tar.gz` as non-root + And I run `tar -tf pro_logs.tar.gz` as non-root Then stdout does not contain substring """ user0.log """ When i verify that running `pro status` `as non-root` exits `0` And I verify that running `pro collect-logs` `with sudo` exits `0` - And I run `tar -tf ua_logs.tar.gz` as non-root + And I run `tar -tf pro_logs.tar.gz` as non-root Then stdout contains substring """ user0.log diff --git a/uaclient/cli/__init__.py b/uaclient/cli/__init__.py index 7995928425..bd2910ca70 100644 --- a/uaclient/cli/__init__.py +++ b/uaclient/cli/__init__.py @@ -74,7 +74,7 @@ STATUS_FORMATS = ["tabular", "json", "yaml"] -UA_COLLECT_LOGS_FILE = "ua_logs.tar.gz" +UA_COLLECT_LOGS_FILE = "pro_logs.tar.gz" event = event_logger.get_event_logger() LOG = logging.getLogger(util.replace_top_level_logger_name(__name__)) diff --git a/uaclient/cli/tests/test_cli_collect_logs.py b/uaclient/cli/tests/test_cli_collect_logs.py index 1c835fa7d7..32aaa2fe80 100644 --- a/uaclient/cli/tests/test_cli_collect_logs.py +++ b/uaclient/cli/tests/test_cli_collect_logs.py @@ -24,7 +24,7 @@ -h, --help show this help message and exit -o OUTPUT, --output OUTPUT tarball where the logs will be stored. \(Defaults to - ./ua_logs.tar.gz\) + ./pro_logs.tar.gz\) """ # noqa ) diff --git a/uaclient/messages/__init__.py b/uaclient/messages/__init__.py index c58a31474d..4942c768ec 100644 --- a/uaclient/messages/__init__.py +++ b/uaclient/messages/__init__.py @@ -895,7 +895,7 @@ class TxtColor: "Collect logs and relevant system information into a tarball." ) CLI_COLLECT_LOGS_OUTPUT = t.gettext( - "tarball where the logs will be stored. (Defaults to " "./ua_logs.tar.gz)" + "tarball where the logs will be stored. (Defaults to " "./pro_logs.tar.gz)" ) CLI_CONFIG_SHOW_DESC = t.gettext("Show customizable configuration settings") diff --git a/ubuntu-advantage.1 b/ubuntu-advantage.1 index cda09fe759..605ea043d3 100644 --- a/ubuntu-advantage.1 +++ b/ubuntu-advantage.1 @@ -53,7 +53,7 @@ The exit code can be: Create a tarball with all relevant logs and debug data. The \fI--output\fR parameter defines the path to the tarball. If not -provided, the file is saved as \fBua_logs.tar.gz\fP in the current +provided, the file is saved as \fBpro_logs.tar.gz\fP in the current directory. .TP