Skip to content

Commit 3e14ab9

Browse files
committed
Add more test messages in unit tests
1 parent cfdba5b commit 3e14ab9

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

src/test_utils/test_file.rs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,26 @@ use std::sync::atomic::{AtomicUsize, Ordering};
55

66
use chrono::Local;
77

8-
pub const AUTH_FAILED_TEST_MESSAGES: [&str; 3] = [
8+
pub const AUTH_FAILED_TEST_MESSAGES: [&str; 6] = [
99
"workstation sudo: pam_unix(sudo:auth): authentication failure; logname=john uid=1000 euid=0 tty=/dev/pts/7 ruser=john rhost= user=john",
1010
"workstation kscreenlocker_greet: pam_unix(kde:auth): authentication failure; logname= uid=1000 euid=1000 tty= ruser= rhost= user=john",
11-
"workstation unix_chkpwd[222793]: password check failed for user (john)"
11+
"workstation unix_chkpwd[222793]: password check failed for user (john)",
12+
"workstation kscreenlocker_greet: pam_unix(kde:auth): authentication failure; logname=john uid=1000 euid=1000 tty= ruser= rhost= user=john",
13+
"workstation kscreenlocker_greet: pam_unix(kde-fingerprint:auth): authentication failure; logname=john uid=1000 euid=1000 tty= ruser= rhost= user=john",
14+
"workstation kscreenlocker_greet: pam_unix(kde-smartcard:auth): authentication failure; logname=john uid=1000 euid=1000 tty= ruser= rhost= user=john",
1215
];
1316

14-
const OTHER_TEST_MESSAGES: [&str; 4] = [
17+
const OTHER_TEST_MESSAGES: [&str; 10] = [
1518
"workstation dbus-daemon[1988]: [system] Failed to activate service 'org.bluez': timed out (service_start_timeout=25000ms)",
1619
"workstation CRON[9419]: pam_unix(cron:session): session opened for user root(uid=0) by (uid=0)",
1720
"workstation CRON[9419]: pam_unix(cron:session): session closed for user root",
1821
"workstation PackageKit: uid 1000 is trying to obtain org.freedesktop.packagekit.system-sources-refresh auth (only_trusted:0)",
22+
"workstation kscreenlocker_greet: pam_unix(kde-fingerprint:auth): unexpected response from failed conversation function",
23+
"workstation kscreenlocker_greet: pam_unix(kde-fingerprint:auth): conversation failed",
24+
"workstation kscreenlocker_greet: pam_unix(kde-fingerprint:auth): auth could not identify password for [john]",
25+
"workstation kscreenlocker_greet: pam_unix(kde-smartcard:auth): unexpected response from failed conversation function",
26+
"workstation kscreenlocker_greet: pam_unix(kde-smartcard:auth): conversation failed",
27+
"workstation kscreenlocker_greet: pam_unix(kde-smartcard:auth): auth could not identify password for [john]",
1928
];
2029

2130
pub struct TestFile {

0 commit comments

Comments
 (0)