Skip to content

Commit

Permalink
test: Adjust some tests for rhel-8-10/ws-container scenario
Browse files Browse the repository at this point in the history
  • Loading branch information
martinpitt committed Oct 24, 2024
1 parent 26265b3 commit 0c12958
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions test/verify/check-metrics
Original file line number Diff line number Diff line change
Expand Up @@ -1191,6 +1191,10 @@ BEGIN {{
b.wait_visible(progress_sel)
b.logout()

# no host-local configs/overrides with ws container
if m.ws_container:
return

# without cockpit-storaged, mounts are not links
self.restore_file("/usr/share/cockpit/storaged/manifest.json")
m.write("/usr/share/cockpit/storaged/manifest.json", "")
Expand Down
4 changes: 2 additions & 2 deletions test/verify/check-system-info
Original file line number Diff line number Diff line change
Expand Up @@ -797,9 +797,9 @@ password=foobar
profile = m.execute(cmd + " --show").strip()
b.wait_text("#crypto-policy-button", shown_profile_text(profile))

# RHEL 10 has no SHA1 policy, so do not show it.
# RHEL 8/10 have no SHA1 policy, so do not show it.
b.click("#crypto-policy-button")
func = b.wait_not_present if re.match('(centos|rhel)-10.*', m.image) else b.wait_visible
func = b.wait_not_present if re.match('(centos|rhel)-(8|10).*', m.image) else b.wait_visible
func(".pf-v5-c-menu__item-main .pf-v5-c-menu__item-text:contains('DEFAULT:SHA1')")
b.click("#crypto-policy-dialog button:contains('Cancel')")
b.wait_not_present("#crypto-policy-dialog")
Expand Down
2 changes: 1 addition & 1 deletion test/verify/check-users
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@ class TestAccounts(testlib.MachineCase):
# with container this happens over ssh
if m.ws_container:
self.restore_dir("/etc/ssh", restart_unit=self.sshd_service)
m.execute("sed -i 's/.*ChallengeResponseAuthentication.*/ChallengeResponseAuthentication yes/' /etc/ssh/sshd_config /etc/ssh/sshd_config.d/*")
m.execute("sed -i 's/.*ChallengeResponseAuthentication.*/ChallengeResponseAuthentication yes/' /etc/ssh/sshd_config $(ls /etc/ssh/sshd_config.d/* 2>/dev/null) || true")
m.execute(self.restart_sshd)

b.wait_visible("#login")
Expand Down

0 comments on commit 0c12958

Please sign in to comment.