From e74aec935490a04b302089e0a0bf4126eeacb4b5 Mon Sep 17 00:00:00 2001 From: Andrew Bettison Date: Mon, 9 Sep 2013 14:46:12 +0930 Subject: [PATCH] Tests for starting daemon with keyring entry PINs --- tests/keyring | 42 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/tests/keyring b/tests/keyring index 63472d35..d06ff507 100755 --- a/tests/keyring +++ b/tests/keyring @@ -146,7 +146,7 @@ teardown_KeyringAutoCreate() { report_servald_server } -doc_KeyringPinServer="Start a server with a keyring PIN" +doc_KeyringPinServer="Start daemon with a keyring PIN" setup_KeyringPinServer() { setup create_single_identity --keyring-pin=yellow @@ -166,6 +166,46 @@ teardown_KeyringPinServer() { report_servald_server } +doc_EntryPinServer="Start daemon with an entry PIN" +setup_EntryPinServer() { + setup + create_single_identity --entry-pin=yodel +} +test_EntryPinServer() { + start_servald_server --entry-pin=yodel + executeOk_servald id self + assertStdoutLineCount == 1 + assertStdoutGrep --fixed-strings "$SIDA" +} +finally_KeyringPinServer() { + stop_servald_server +} +teardown_KeyringPinServer() { + kill_all_servald_processes + assert_no_servald_processes + report_servald_server +} + +doc_KeyringEntryPinServer="Start daemon with a keyring and an entry PIN" +setup_KeyringEntryPinServer() { + setup + create_single_identity --keyring-pin=yellow --entry-pin=yodel +} +test_KeyringEntryPinServer() { + start_servald_server --keyring-pin=yellow --entry-pin=yodel + executeOk_servald id self + assertStdoutLineCount == 1 + assertStdoutGrep --fixed-strings "$SIDA" +} +finally_KeyringKeyringPinServer() { + stop_servald_server +} +teardown_KeyringKeyringPinServer() { + kill_all_servald_processes + assert_no_servald_processes + report_servald_server +} + doc_Load="Load keyring entries from a keyring dump" setup_Load() { setup_servald