summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Ancell <robert.ancell@canonical.com>2016-07-29 15:51:54 +1200
committerRobert Ancell <robert.ancell@canonical.com>2016-07-29 15:51:54 +1200
commitf8f93a8e5d724758f857cf674fa566b8cc74017c (patch)
treec3030d32467f540f01852e4b78f78398478626d5
parentc673712bb461cec49d4c8a6db25c96ca7c8fc6f3 (diff)
downloadlightdm-git-f8f93a8e5d724758f857cf674fa566b8cc74017c.tar.gz
Add test to check in-session greeter doesn't open a new session when unlocking active session
-rw-r--r--tests/Makefile.am4
-rw-r--r--tests/scripts/session-greeter-unlock.conf44
-rwxr-xr-xtests/test-session-greeter-unlock2
3 files changed, 49 insertions, 1 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 41934259..1caeea0f 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -168,7 +168,8 @@ TESTS = \
test-switch-to-users \
test-session-greeter \
test-session-greeter-autologin \
- test-session-greeter-reconnect \
+ test-session-greeter-reconnect \
+ test-session-greeter-unlock \
test-vnc-login \
test-vnc-command \
test-vnc-dimensions \
@@ -543,6 +544,7 @@ EXTRA_DIST = \
scripts/session-greeter.conf \
scripts/session-greeter-autologin.conf \
scripts/session-greeter-reconnect.conf \
+ scripts/session-greeter-unlock.conf \
scripts/session-stdout.conf \
scripts/session-stderr.conf \
scripts/session-stderr-multi-write.conf \
diff --git a/tests/scripts/session-greeter-unlock.conf b/tests/scripts/session-greeter-unlock.conf
new file mode 100644
index 00000000..f188600d
--- /dev/null
+++ b/tests/scripts/session-greeter-unlock.conf
@@ -0,0 +1,44 @@
+#
+# Check can unlock user with an in-session greeter
+#
+
+[Seat:*]
+autologin-user=have-password1
+user-session=greeter
+
+#?*START-DAEMON
+#?RUNNER DAEMON-START
+
+# X server starts
+#?XSERVER-0 START VT=7 SEAT=seat0
+
+# Daemon connects when X server is ready
+#?*XSERVER-0 INDICATE-READY
+#?XSERVER-0 INDICATE-READY
+#?XSERVER-0 ACCEPT-CONNECT
+
+# Session starts
+#?SESSION-X-0 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_GREETER_DATA_DIR=.*/have-password1 XDG_SESSION_TYPE=x11 XDG_SESSION_DESKTOP=greeter USER=have-password1
+#?LOGIN1 ACTIVATE-SESSION SESSION=c0
+#?XSERVER-0 ACCEPT-CONNECT
+#?SESSION-X-0 CONNECT-XSERVER
+
+# Start greeter inside session
+#?*SESSION-X-0 GREETER-START
+#?SESSION-X-0 GREETER-STARTED
+
+# Log into our account
+#?*SESSION-X-0 GREETER-AUTHENTICATE USERNAME=have-password1
+#?SESSION-X-0 GREETER-SHOW-PROMPT TEXT="Password:"
+#?*SESSION-X-0 GREETER-RESPOND TEXT="password"
+#?SESSION-X-0 GREETER-AUTHENTICATION-COMPLETE USERNAME=have-password1 AUTHENTICATED=TRUE
+#?*SESSION-X-0 GREETER-START-SESSION
+
+# We are reactivated
+#?LOGIN1 ACTIVATE-SESSION SESSION=c0
+
+# Cleanup
+#?*STOP-DAEMON
+#?SESSION-X-0 TERMINATE SIGNAL=15
+#?XSERVER-0 TERMINATE SIGNAL=15
+#?RUNNER DAEMON-EXIT STATUS=0
diff --git a/tests/test-session-greeter-unlock b/tests/test-session-greeter-unlock
new file mode 100755
index 00000000..4277a357
--- /dev/null
+++ b/tests/test-session-greeter-unlock
@@ -0,0 +1,2 @@
+#!/bin/sh
+./src/dbus-env ./src/test-runner session-greeter-unlock test-gobject-greeter