summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRobert Ancell <robert.ancell@canonical.com>2011-06-27 12:31:24 +0100
committerRobert Ancell <robert.ancell@canonical.com>2011-06-27 12:31:24 +0100
commitaced7af450339014e6e2cb66c0bb251cddd54f9d (patch)
tree20da6756596c7139839acbe826c8c7fb37a5c758 /tests
parentfb6ebf6fc85837ba79293202bce66c74ca9e7f3c (diff)
downloadlightdm-aced7af450339014e6e2cb66c0bb251cddd54f9d.tar.gz
Add more tests for guest sessions
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.am6
-rw-r--r--tests/scripts/login-gobject-guest-disabled.conf11
-rw-r--r--tests/scripts/login-gobject-guest-disabled.script20
-rw-r--r--tests/scripts/login-gobject-guest-fail-setup-script.conf9
-rw-r--r--tests/scripts/login-gobject-guest-fail-setup-script.script16
-rw-r--r--tests/scripts/login-gobject-guest-no-config.conf6
-rw-r--r--tests/scripts/login-gobject-guest-no-config.script16
-rw-r--r--tests/scripts/login-gobject-guest-no-setup-script.conf9
-rw-r--r--tests/scripts/login-gobject-guest-no-setup-script.script16
-rwxr-xr-xtests/test-login-gobject-guest-disabled2
-rwxr-xr-xtests/test-login-gobject-guest-fail-setup-script2
-rwxr-xr-xtests/test-login-gobject-guest-no-config2
-rwxr-xr-xtests/test-login-gobject-guest-no-setup-script2
13 files changed, 116 insertions, 1 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 58a1a88d..9570afea 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -9,7 +9,11 @@ TESTS = \
test-login-gobject-invalid-user \
test-login-gobject-logout \
test-login-gobject-session-crash \
- test-login-gobject-guest
+ test-login-gobject-guest \
+ test-login-gobject-guest-no-config \
+ test-login-gobject-guest-disabled \
+ test-login-gobject-guest-no-setup-script \
+ test-login-gobject-guest-fail-setup-script
EXTRA_DIST = \
$(TESTS) \
diff --git a/tests/scripts/login-gobject-guest-disabled.conf b/tests/scripts/login-gobject-guest-disabled.conf
new file mode 100644
index 00000000..e5687be3
--- /dev/null
+++ b/tests/scripts/login-gobject-guest-disabled.conf
@@ -0,0 +1,11 @@
+[LightDM]
+seats=test-seat
+
+[test-seat]
+greeter-theme=login-guest
+display-number=99
+
+[GuestAccount]
+enabled=true
+setup-script=test-setup-guest
+cleanup-script=test-cleanup-guest
diff --git a/tests/scripts/login-gobject-guest-disabled.script b/tests/scripts/login-gobject-guest-disabled.script
new file mode 100644
index 00000000..aa86ea78
--- /dev/null
+++ b/tests/scripts/login-gobject-guest-disabled.script
@@ -0,0 +1,20 @@
+RUNNER DAEMON-START
+XSERVER :.* START
+XSERVER :.* INDICATE-READY
+XSERVER :.* ACCEPT-CONNECT
+GREETER START
+XSERVER :.* ACCEPT-CONNECT
+GREETER CONNECT-XSERVER :.*
+GREETER CONNECT-TO-DAEMON
+GREETER CONNECTED-TO-DAEMON
+GREETER LOGIN-GUEST
+GREETER AUTHENTICATION-COMPLETE AUTHENTICATED=TRUE
+GREETER QUIT
+SESSION START USER=guest
+XSERVER :.* ACCEPT-CONNECT
+SESSION CONNECT-XSERVER
+*STOP-DAEMON
+# Don't know what order they will terminate
+(SESSION TERMINATE SIGNAL=15|XSERVER :.* TERMINATE SIGNAL=15)
+(SESSION TERMINATE SIGNAL=15|XSERVER :.* TERMINATE SIGNAL=15)
+RUNNER DAEMON-EXIT STATUS=0
diff --git a/tests/scripts/login-gobject-guest-fail-setup-script.conf b/tests/scripts/login-gobject-guest-fail-setup-script.conf
new file mode 100644
index 00000000..33202563
--- /dev/null
+++ b/tests/scripts/login-gobject-guest-fail-setup-script.conf
@@ -0,0 +1,9 @@
+[LightDM]
+seats=test-seat
+
+[test-seat]
+greeter-theme=login-guest
+display-number=99
+
+[GuestAccount]
+enabled=false
diff --git a/tests/scripts/login-gobject-guest-fail-setup-script.script b/tests/scripts/login-gobject-guest-fail-setup-script.script
new file mode 100644
index 00000000..f46f0c12
--- /dev/null
+++ b/tests/scripts/login-gobject-guest-fail-setup-script.script
@@ -0,0 +1,16 @@
+RUNNER DAEMON-START
+XSERVER :.* START
+XSERVER :.* INDICATE-READY
+XSERVER :.* ACCEPT-CONNECT
+GREETER START
+XSERVER :.* ACCEPT-CONNECT
+GREETER CONNECT-XSERVER :.*
+GREETER CONNECT-TO-DAEMON
+GREETER CONNECTED-TO-DAEMON
+GREETER LOGIN-GUEST
+GREETER AUTHENTICATION-COMPLETE AUTHENTICATED=FALSE
+*STOP-DAEMON
+# Don't know what order they will terminate
+(GREETER TERMINATE SIGNAL=15|XSERVER :.* TERMINATE SIGNAL=15)
+(GREETER TERMINATE SIGNAL=15|XSERVER :.* TERMINATE SIGNAL=15)
+RUNNER DAEMON-EXIT STATUS=0
diff --git a/tests/scripts/login-gobject-guest-no-config.conf b/tests/scripts/login-gobject-guest-no-config.conf
new file mode 100644
index 00000000..c20fdc9a
--- /dev/null
+++ b/tests/scripts/login-gobject-guest-no-config.conf
@@ -0,0 +1,6 @@
+[LightDM]
+seats=test-seat
+
+[test-seat]
+greeter-theme=login-guest
+display-number=99
diff --git a/tests/scripts/login-gobject-guest-no-config.script b/tests/scripts/login-gobject-guest-no-config.script
new file mode 100644
index 00000000..f46f0c12
--- /dev/null
+++ b/tests/scripts/login-gobject-guest-no-config.script
@@ -0,0 +1,16 @@
+RUNNER DAEMON-START
+XSERVER :.* START
+XSERVER :.* INDICATE-READY
+XSERVER :.* ACCEPT-CONNECT
+GREETER START
+XSERVER :.* ACCEPT-CONNECT
+GREETER CONNECT-XSERVER :.*
+GREETER CONNECT-TO-DAEMON
+GREETER CONNECTED-TO-DAEMON
+GREETER LOGIN-GUEST
+GREETER AUTHENTICATION-COMPLETE AUTHENTICATED=FALSE
+*STOP-DAEMON
+# Don't know what order they will terminate
+(GREETER TERMINATE SIGNAL=15|XSERVER :.* TERMINATE SIGNAL=15)
+(GREETER TERMINATE SIGNAL=15|XSERVER :.* TERMINATE SIGNAL=15)
+RUNNER DAEMON-EXIT STATUS=0
diff --git a/tests/scripts/login-gobject-guest-no-setup-script.conf b/tests/scripts/login-gobject-guest-no-setup-script.conf
new file mode 100644
index 00000000..56563c41
--- /dev/null
+++ b/tests/scripts/login-gobject-guest-no-setup-script.conf
@@ -0,0 +1,9 @@
+[LightDM]
+seats=test-seat
+
+[test-seat]
+greeter-theme=login-guest
+display-number=99
+
+[GuestAccount]
+enabled=true
diff --git a/tests/scripts/login-gobject-guest-no-setup-script.script b/tests/scripts/login-gobject-guest-no-setup-script.script
new file mode 100644
index 00000000..f46f0c12
--- /dev/null
+++ b/tests/scripts/login-gobject-guest-no-setup-script.script
@@ -0,0 +1,16 @@
+RUNNER DAEMON-START
+XSERVER :.* START
+XSERVER :.* INDICATE-READY
+XSERVER :.* ACCEPT-CONNECT
+GREETER START
+XSERVER :.* ACCEPT-CONNECT
+GREETER CONNECT-XSERVER :.*
+GREETER CONNECT-TO-DAEMON
+GREETER CONNECTED-TO-DAEMON
+GREETER LOGIN-GUEST
+GREETER AUTHENTICATION-COMPLETE AUTHENTICATED=FALSE
+*STOP-DAEMON
+# Don't know what order they will terminate
+(GREETER TERMINATE SIGNAL=15|XSERVER :.* TERMINATE SIGNAL=15)
+(GREETER TERMINATE SIGNAL=15|XSERVER :.* TERMINATE SIGNAL=15)
+RUNNER DAEMON-EXIT STATUS=0
diff --git a/tests/test-login-gobject-guest-disabled b/tests/test-login-gobject-guest-disabled
new file mode 100755
index 00000000..5230845a
--- /dev/null
+++ b/tests/test-login-gobject-guest-disabled
@@ -0,0 +1,2 @@
+#!/bin/sh
+./src/test-runner login-gobject-guest-disabled
diff --git a/tests/test-login-gobject-guest-fail-setup-script b/tests/test-login-gobject-guest-fail-setup-script
new file mode 100755
index 00000000..3d244b9c
--- /dev/null
+++ b/tests/test-login-gobject-guest-fail-setup-script
@@ -0,0 +1,2 @@
+#!/bin/sh
+./src/test-runner login-gobject-guest-fail-setup-script
diff --git a/tests/test-login-gobject-guest-no-config b/tests/test-login-gobject-guest-no-config
new file mode 100755
index 00000000..8df23f92
--- /dev/null
+++ b/tests/test-login-gobject-guest-no-config
@@ -0,0 +1,2 @@
+#!/bin/sh
+./src/test-runner login-gobject-guest-no-config
diff --git a/tests/test-login-gobject-guest-no-setup-script b/tests/test-login-gobject-guest-no-setup-script
new file mode 100755
index 00000000..ae76a8c6
--- /dev/null
+++ b/tests/test-login-gobject-guest-no-setup-script
@@ -0,0 +1,2 @@
+#!/bin/sh
+./src/test-runner login-gobject-guest-no-setup-script