Skip to content

Commit

Permalink
tests: Use LogLevel option for testing to avoid OpenSSH 9.9 bug
Browse files Browse the repository at this point in the history
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 <jjelen@redhat.com>
  • Loading branch information
Jakuje committed Dec 16, 2024
1 parent 16e8bda commit 5fe8557
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions tests/tests_alternative_file.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand Down
8 changes: 4 additions & 4 deletions tests/tests_alternative_file_role.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand Down

0 comments on commit 5fe8557

Please sign in to comment.