summaryrefslogtreecommitdiff
path: root/tests/scripts
diff options
context:
space:
mode:
authorRobert Ancell <robert.ancell@canonical.com>2012-03-19 16:57:10 +1100
committerRobert Ancell <robert.ancell@canonical.com>2012-03-19 16:57:10 +1100
commitf8841d64f28da418060092a8e181e0693906b23e (patch)
treed604398e91f166ca809fde97e1e048302454b383 /tests/scripts
parent3fabe7b6251002405ef5bcc831042523bbe15785 (diff)
downloadlightdm-f8841d64f28da418060092a8e181e0693906b23e.tar.gz
Add tests for multiply PAM info prompts and two factor authentication
Diffstat (limited to 'tests/scripts')
-rw-r--r--tests/scripts/login-multi-info-prompt.conf40
-rw-r--r--tests/scripts/login-two-factor.conf37
2 files changed, 77 insertions, 0 deletions
diff --git a/tests/scripts/login-multi-info-prompt.conf b/tests/scripts/login-multi-info-prompt.conf
new file mode 100644
index 00000000..1baf5eeb
--- /dev/null
+++ b/tests/scripts/login-multi-info-prompt.conf
@@ -0,0 +1,40 @@
+#
+# Check multiple PAM informational messages on login are passed to a greeter
+#
+
+[LightDM]
+minimum-display-number=50
+
+#?RUNNER DAEMON-START
+
+# X server starts
+#?XSERVER :50 START
+#?XSERVER :50 INDICATE-READY
+
+# LightDM connects to X server
+#?XSERVER :50 ACCEPT-CONNECT
+
+# Greeter starts
+#?GREETER :50 START
+#?XSERVER :50 ACCEPT-CONNECT
+#?GREETER :50 CONNECT-XSERVER
+#?GREETER :50 CONNECT-TO-DAEMON
+#?GREETER :50 CONNECTED-TO-DAEMON
+
+# Log into account and see an informational prompt
+#?*GREETER :50 AUTHENTICATE USERNAME=multi-info-prompt
+#?GREETER :50 SHOW-MESSAGE TEXT="Welcome to LightDM"
+#?GREETER :50 SHOW-MESSAGE TEXT="This is an error"
+#?GREETER :50 SHOW-MESSAGE TEXT="You should have seen three messages"
+#?GREETER :50 SHOW-PROMPT TEXT="Password:"
+
+# Respond with password and check response is correctly handled
+#?*GREETER :50 RESPOND TEXT="password"
+#?GREETER :50 AUTHENTICATION-COMPLETE USERNAME=multi-info-prompt AUTHENTICATED=TRUE
+
+# Cleanup
+#?*STOP-DAEMON
+# Don't know what order they will terminate
+#?(GREETER :50 TERMINATE SIGNAL=15|XSERVER :50 TERMINATE SIGNAL=15)
+#?(GREETER :50 TERMINATE SIGNAL=15|XSERVER :50 TERMINATE SIGNAL=15)
+#?RUNNER DAEMON-EXIT STATUS=0
diff --git a/tests/scripts/login-two-factor.conf b/tests/scripts/login-two-factor.conf
new file mode 100644
index 00000000..04791dde
--- /dev/null
+++ b/tests/scripts/login-two-factor.conf
@@ -0,0 +1,37 @@
+#
+# Check can login with two factor
+#
+
+[LightDM]
+minimum-display-number=50
+
+#?RUNNER DAEMON-START
+
+# X server starts
+#?XSERVER :50 START
+#?XSERVER :50 INDICATE-READY
+
+# LightDM connects to X server
+#?XSERVER :50 ACCEPT-CONNECT
+
+# Greeter starts
+#?GREETER :50 START
+#?XSERVER :50 ACCEPT-CONNECT
+#?GREETER :50 CONNECT-XSERVER
+#?GREETER :50 CONNECT-TO-DAEMON
+#?GREETER :50 CONNECTED-TO-DAEMON
+
+# Log into account with a password
+#?*GREETER :50 AUTHENTICATE USERNAME=two-factor
+#?GREETER :50 SHOW-PROMPT TEXT="Password:"
+#?*GREETER :50 RESPOND TEXT="password"
+#?GREETER :50 SHOW-PROMPT TEXT="OTP:"
+#?*GREETER :50 RESPOND TEXT="otp"
+#?GREETER :50 AUTHENTICATION-COMPLETE USERNAME=two-factor AUTHENTICATED=TRUE
+
+# Cleanup
+#?*STOP-DAEMON
+# Don't know what order they will terminate
+#?(GREETER :50 TERMINATE SIGNAL=15|XSERVER :50 TERMINATE SIGNAL=15)
+#?(GREETER :50 TERMINATE SIGNAL=15|XSERVER :50 TERMINATE SIGNAL=15)
+#?RUNNER DAEMON-EXIT STATUS=0