fix(backend): non-login SSH and strict loginctl parse, SSH retry (0.20.31)
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -16,6 +16,20 @@ def test_parse_loginctl_sessions():
|
||||
assert rows[0].tty == "pts/0"
|
||||
|
||||
|
||||
def test_parse_loginctl_sessions_ignores_motd_noise():
|
||||
stdout = """This server is powered by FASTPANEL
|
||||
Ubuntu Operating LTS
|
||||
configuration By can be not
|
||||
11090 1000 papatramp - - active -
|
||||
11102 1000 papatramp - - active -
|
||||
"""
|
||||
rows = parse_loginctl_sessions(stdout)
|
||||
assert len(rows) == 2
|
||||
assert rows[0].session_id == "11090"
|
||||
assert rows[1].session_id == "11102"
|
||||
assert all(row.user == "papatramp" for row in rows)
|
||||
|
||||
|
||||
def test_parse_qwinsta_sessions_filters_user():
|
||||
stdout = """SESSIONNAME USERNAME ID STATE
|
||||
console Administrator 1 Active
|
||||
|
||||
Reference in New Issue
Block a user