From 5fe85578513d9a69ffcf168702f0c4fcff2870ec Mon Sep 17 00:00:00 2001 From: Jakub Jelen Date: Mon, 16 Dec 2024 14:24:00 +0100 Subject: [PATCH] tests: Use LogLevel option for testing to avoid OpenSSH 9.9 bug The OpenSSH 9.9p1 has a bug in parsing/printing the Compression option so lets use different option for testing. https://bugzilla.mindrot.org/show_bug.cgi?id=3759 Signed-off-by: Jakub Jelen --- tests/tests_alternative_file.yml | 8 ++++---- tests/tests_alternative_file_role.yml | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/tests_alternative_file.yml b/tests/tests_alternative_file.yml index b54a8f6..26055bf 100644 --- a/tests/tests_alternative_file.yml +++ b/tests/tests_alternative_file.yml @@ -37,7 +37,7 @@ AcceptEnv: LANG Banner: /etc/issue Ciphers: aes256-ctr - sshd_Compression: false # noqa var-naming + sshd_LogLevel: DEBUG1 - name: Configure second alternative sshd_config file ansible.builtin.include_role: @@ -95,7 +95,7 @@ - "'AcceptEnv LANG' in config.content | b64decode" - "'Banner /etc/issue' in config.content | b64decode" - "'Ciphers aes256-ctr' in config.content | b64decode" - - "'Compression no' in config.content | b64decode" + - "'LogLevel DEBUG1' in config.content | b64decode" - name: Check Fedora/RHEL9+ defaults are present in the first configuration file ansible.builtin.assert: @@ -159,7 +159,7 @@ - "'Ciphers aes128-ctr' in config2.content | b64decode" - "'HostKey' not in config2.content | b64decode" - "'MaxStartups 100' in config2.content | b64decode" - - "'Compression no' not in config2.content | b64decode" + - "'LogLevel DEBUG1' not in config2.content | b64decode" - name: Check content of the main configuration file ansible.builtin.assert: @@ -169,7 +169,7 @@ - "'HostKey /tmp/ssh_host_ecdsa_key' in config3.content | b64decode" - "'PasswordAuthentication no' in config3.content | b64decode" - "'MaxStartups 100' not in config3.content | b64decode" - - "'Compression no' not in config3.content | b64decode" + - "'LogLevel DEBUG1' not in config3.content | b64decode" - name: Check the main configuration file contains some default values for RHEL 9 ansible.builtin.assert: diff --git a/tests/tests_alternative_file_role.yml b/tests/tests_alternative_file_role.yml index 63a76f7..70b68c3 100644 --- a/tests/tests_alternative_file_role.yml +++ b/tests/tests_alternative_file_role.yml @@ -39,7 +39,7 @@ AcceptEnv: LANG Banner: /etc/issue Ciphers: aes256-ctr - sshd_Compression: false # noqa var-naming + sshd_LogLevel: DEBUG1 # Configure second alternative sshd_config file - name: Test first alternative role file @@ -113,7 +113,7 @@ - "'AcceptEnv LANG' in config.content | b64decode" - "'Banner /etc/issue' in config.content | b64decode" - "'Ciphers aes256-ctr' in config.content | b64decode" - - "'Compression no' in config.content | b64decode" + - "'LogLevel DEBUG1' in config.content | b64decode" - name: Check Fedora/RHEL9+ defaults are present in the first configuration file ansible.builtin.assert: @@ -177,7 +177,7 @@ - "'Ciphers aes128-ctr' in config2.content | b64decode" - "'HostKey' not in config2.content | b64decode" - "'MaxStartups 100' in config2.content | b64decode" - - "'Compression no' not in config2.content | b64decode" + - "'LogLevel DEBUG1' not in config2.content | b64decode" - name: Check content of the main configuration file ansible.builtin.assert: @@ -187,7 +187,7 @@ - "'HostKey /tmp/ssh_host_ecdsa_key' in config3.content | b64decode" - "'PasswordAuthentication no' in config3.content | b64decode" - "'MaxStartups 100' not in config3.content | b64decode" - - "'Compression no' not in config3.content | b64decode" + - "'LogLevel DEBUG1' not in config3.content | b64decode" - name: Check the main configuration file contains some default values for RHEL 9 ansible.builtin.assert: