summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Ancell <robert.ancell@canonical.com>2012-04-04 15:38:28 +1000
committerRobert Ancell <robert.ancell@canonical.com>2012-04-04 15:38:28 +1000
commit05110c049035c81aceea82c1c705912f1be71c68 (patch)
tree64520b672e31ed46d128b830ecdb4331c77c8cb7
parent1b3cb8dcfb371f87963831a24eca17f5b65bafa9 (diff)
downloadlightdm-05110c049035c81aceea82c1c705912f1be71c68.tar.gz
Add tests for long usernames and passwords
-rw-r--r--tests/Makefile.am8
-rw-r--r--tests/scripts/login-long-password.conf35
-rw-r--r--tests/scripts/login-long-username.conf35
-rwxr-xr-xtests/test-login-gobject-long-password2
-rwxr-xr-xtests/test-login-gobject-long-username2
-rwxr-xr-xtests/test-login-python-long-password2
-rwxr-xr-xtests/test-login-python-long-username2
-rwxr-xr-xtests/test-login-qt-long-password2
-rwxr-xr-xtests/test-login-qt-long-username2
9 files changed, 90 insertions, 0 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 98fb08ee..301edf06 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -47,6 +47,8 @@ TESTS = \
test-login-gobject-manual \
test-login-gobject-manual-previous-session \
test-login-gobject-no-password \
+ test-login-gobject-long-username \
+ test-login-gobject-long-password \
test-login-gobject-two-factor \
test-login-gobject-new-authtok \
test-login-gobject-info-prompt \
@@ -66,6 +68,8 @@ TESTS = \
test-login-python-manual \
test-login-python-manual-previous-session \
test-login-python-no-password \
+ test-login-python-long-username \
+ test-login-python-long-password \
test-login-python-two-factor \
test-login-python-new-authtok \
test-login-python-info-prompt \
@@ -121,6 +125,8 @@ TESTS += \
test-login-qt-manual \
test-login-qt-manual-previous-session \
test-login-qt-no-password \
+ test-login-qt-long-username \
+ test-login-qt-long-password \
test-login-qt-two-factor \
test-login-qt-new-authtok \
test-login-qt-info-prompt \
@@ -190,6 +196,8 @@ EXTRA_DIST = \
scripts/login-invalid-session.conf \
scripts/login-invalid-user.conf \
scripts/login-logout.conf \
+ scripts/login-long-username.conf \
+ scripts/login-long-password.conf \
scripts/login-manual.conf \
scripts/login-manual-previous-session.conf \
scripts/login-multi-info-prompt.conf \
diff --git a/tests/scripts/login-long-password.conf b/tests/scripts/login-long-password.conf
new file mode 100644
index 00000000..1eaf1dda
--- /dev/null
+++ b/tests/scripts/login-long-password.conf
@@ -0,0 +1,35 @@
+#
+# Check can handle very long password being provided
+#
+
+[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 in with a very long username
+#?*GREETER :50 AUTHENTICATE USERNAME=have-password1
+#?GREETER :50 SHOW-PROMPT TEXT="Password:"
+#?*GREETER :50 RESPOND TEXT="0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"
+#?GREETER :50 AUTHENTICATION-COMPLETE USERNAME=have-password1 AUTHENTICATED=FALSE
+
+# 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-long-username.conf b/tests/scripts/login-long-username.conf
new file mode 100644
index 00000000..2ae4cd14
--- /dev/null
+++ b/tests/scripts/login-long-username.conf
@@ -0,0 +1,35 @@
+#
+# Check can handle very long username being provided
+#
+
+[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 in with a very long username
+#?*GREETER :50 AUTHENTICATE USERNAME=0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
+#?GREETER :50 SHOW-PROMPT TEXT="Password:"
+#?*GREETER :50 RESPOND TEXT="password"
+#?GREETER :50 AUTHENTICATION-COMPLETE USERNAME=0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 AUTHENTICATED=FALSE
+
+# 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/test-login-gobject-long-password b/tests/test-login-gobject-long-password
new file mode 100755
index 00000000..4c411f49
--- /dev/null
+++ b/tests/test-login-gobject-long-password
@@ -0,0 +1,2 @@
+#!/bin/sh
+./src/dbus-env ./src/test-runner login-long-password test-gobject-greeter
diff --git a/tests/test-login-gobject-long-username b/tests/test-login-gobject-long-username
new file mode 100755
index 00000000..ee8e0cee
--- /dev/null
+++ b/tests/test-login-gobject-long-username
@@ -0,0 +1,2 @@
+#!/bin/sh
+./src/dbus-env ./src/test-runner login-long-username test-gobject-greeter
diff --git a/tests/test-login-python-long-password b/tests/test-login-python-long-password
new file mode 100755
index 00000000..785b4266
--- /dev/null
+++ b/tests/test-login-python-long-password
@@ -0,0 +1,2 @@
+#!/bin/sh
+./src/dbus-env ./src/test-runner login-long-password test-python-greeter
diff --git a/tests/test-login-python-long-username b/tests/test-login-python-long-username
new file mode 100755
index 00000000..e743a452
--- /dev/null
+++ b/tests/test-login-python-long-username
@@ -0,0 +1,2 @@
+#!/bin/sh
+./src/dbus-env ./src/test-runner login-long-username test-python-greeter
diff --git a/tests/test-login-qt-long-password b/tests/test-login-qt-long-password
new file mode 100755
index 00000000..9a0aaa7e
--- /dev/null
+++ b/tests/test-login-qt-long-password
@@ -0,0 +1,2 @@
+#!/bin/sh
+./src/dbus-env ./src/test-runner login-long-password test-qt-greeter
diff --git a/tests/test-login-qt-long-username b/tests/test-login-qt-long-username
new file mode 100755
index 00000000..e0219b86
--- /dev/null
+++ b/tests/test-login-qt-long-username
@@ -0,0 +1,2 @@
+#!/bin/sh
+./src/dbus-env ./src/test-runner login-long-username test-qt-greeter