Skip to content

Commit

Permalink
test: Don't create group called user in tests
Browse files Browse the repository at this point in the history
Some distros, like Tumbleweed, already have existing group called user
so it's better to create a group that's called something like bob
  • Loading branch information
Nykseli committed Jan 8, 2025
1 parent 0fdafdd commit c476c58
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/verify/check-connection
Original file line number Diff line number Diff line change
Expand Up @@ -628,11 +628,11 @@ class TestConnection(testlib.MachineCase):
m = self.machine

# non-admin user
m.execute("useradd user")
m.execute("useradd bob")

# enable no-password login for 'admin' and 'user'
# enable no-password login for 'admin' and 'bob'
m.execute("passwd -d admin")
m.execute("passwd -d user")
m.execute("passwd -d bob")

self.sed_file('$ a\\\nPermitEmptyPasswords yes', '/etc/ssh/sshd_config',
self.restart_sshd)
Expand All @@ -654,10 +654,10 @@ class TestConnection(testlib.MachineCase):
# check issue (should be exactly the same as motd)
assertInOrNot(string, m.execute("cat /etc/issue.d/cockpit.issue"), expected=expected)

# check motd as 'root' (via cat) and 'admin' and 'user' (via ssh)
# check motd as 'root' (via cat) and 'admin' and 'bob' (via ssh)
assertInOrNot(string, m.execute("cat /etc/motd.d/cockpit"), expected=expected)
checkMotdForUser(string, expected=expected, user='admin')
checkMotdForUser(string, expected=old_pam and expected, user='user')
checkMotdForUser(string, expected=old_pam and expected, user='bob')

m.stop_cockpit()
checkMotdContent('systemctl')
Expand Down

0 comments on commit c476c58

Please sign in to comment.