diff options
Diffstat (limited to 'test/data')
-rw-r--r-- | test/data/auth/anonymous-client-successful.auth-script | 16 | ||||
-rw-r--r-- | test/data/auth/anonymous-server-successful.auth-script | 13 | ||||
-rw-r--r-- | test/data/auth/external-failed.auth-script | 5 | ||||
-rw-r--r-- | test/data/auth/external-root.auth-script | 3 | ||||
-rw-r--r-- | test/data/auth/external-silly.auth-script | 6 | ||||
-rw-r--r-- | test/data/auth/external-successful.auth-script | 5 |
6 files changed, 44 insertions, 4 deletions
diff --git a/test/data/auth/anonymous-client-successful.auth-script b/test/data/auth/anonymous-client-successful.auth-script new file mode 100644 index 00000000..9a1620bc --- /dev/null +++ b/test/data/auth/anonymous-client-successful.auth-script @@ -0,0 +1,16 @@ +## this tests that a client can login anonymously + +CLIENT + +## Reject whatever mechanism the client picks first +EXPECT_COMMAND AUTH +SEND 'REJECTED DBUS_TEST_NONEXISTENT_MECH1 ANONYMOUS DBUS_TEST_NONEXISTENT_MECH2' + +## And this time we get ANONYMOUS + +EXPECT_COMMAND AUTH +## of course real DBUS_COOKIE_SHA1 would not send this here... +SEND 'OK 1234deadbeef' + +EXPECT_COMMAND BEGIN +EXPECT_STATE AUTHENTICATED diff --git a/test/data/auth/anonymous-server-successful.auth-script b/test/data/auth/anonymous-server-successful.auth-script new file mode 100644 index 00000000..172ae9de --- /dev/null +++ b/test/data/auth/anonymous-server-successful.auth-script @@ -0,0 +1,13 @@ +## this tests the server side in a successful auth of type ANONYMOUS + +SERVER +## verify that prior to doing anything, we haven't authed as anyone +EXPECT_HAVE_NO_CREDENTIALS +SEND 'AUTH ANONYMOUS 442d42757320312e312e31' +EXPECT_COMMAND OK +EXPECT_STATE WAITING_FOR_INPUT +SEND 'BEGIN' +EXPECT_STATE AUTHENTICATED +## verify that we are still anonymous +EXPECT_HAVE_NO_CREDENTIALS + diff --git a/test/data/auth/external-failed.auth-script b/test/data/auth/external-failed.auth-script index b11ee9c5..7c4e9001 100644 --- a/test/data/auth/external-failed.auth-script +++ b/test/data/auth/external-failed.auth-script @@ -2,7 +2,10 @@ SERVER NO_CREDENTIALS +## verify that prior to doing anything, we haven't authed as anyone +EXPECT_HAVE_NO_CREDENTIALS SEND 'AUTH EXTERNAL USERID_HEX' EXPECT_COMMAND REJECTED EXPECT_STATE WAITING_FOR_INPUT - +## verify that we still haven't authed as anyone +EXPECT_HAVE_NO_CREDENTIALS diff --git a/test/data/auth/external-root.auth-script b/test/data/auth/external-root.auth-script index b0189719..ca5b94ac 100644 --- a/test/data/auth/external-root.auth-script +++ b/test/data/auth/external-root.auth-script @@ -2,7 +2,8 @@ SERVER ROOT_CREDENTIALS -SEND 'AUTH EXTERNAL USERID_HEX' +## 30 is ASCII '0' in hex +SEND 'AUTH EXTERNAL 30' EXPECT_COMMAND OK EXPECT_STATE WAITING_FOR_INPUT SEND 'BEGIN' diff --git a/test/data/auth/external-silly.auth-script b/test/data/auth/external-silly.auth-script index 8ac0688a..4e18ee8d 100644 --- a/test/data/auth/external-silly.auth-script +++ b/test/data/auth/external-silly.auth-script @@ -1,8 +1,12 @@ -## this tests we can't auth with silly credentials +## this tests we can't auth if socket reports silly credentials but we ask for our own uid SERVER +## verify that prior to doing anything, we haven't authed as anyone +EXPECT_HAVE_NO_CREDENTIALS SILLY_CREDENTIALS SEND 'AUTH EXTERNAL USERID_HEX' EXPECT_COMMAND REJECTED EXPECT_STATE WAITING_FOR_INPUT +## verify that we still haven't authed as anyone +EXPECT_HAVE_NO_CREDENTIALS diff --git a/test/data/auth/external-successful.auth-script b/test/data/auth/external-successful.auth-script index 128d3294..222938cc 100644 --- a/test/data/auth/external-successful.auth-script +++ b/test/data/auth/external-successful.auth-script @@ -1,9 +1,12 @@ ## this tests a successful auth of type EXTERNAL SERVER +## verify that prior to doing anything, we haven't authed as anyone +EXPECT_HAVE_NO_CREDENTIALS SEND 'AUTH EXTERNAL USERID_HEX' EXPECT_COMMAND OK EXPECT_STATE WAITING_FOR_INPUT SEND 'BEGIN' EXPECT_STATE AUTHENTICATED - +## verify that we now have some credentials +EXPECT_HAVE_SOME_CREDENTIALS |