From 48eb5fcc942d67ee8fff11f3c02dfc6efcecf9a2 Mon Sep 17 00:00:00 2001 From: Michael Rash Date: Sat, 5 Apr 2014 21:29:24 -0400 Subject: [PATCH] [test suite] added key file path too long tests --- test/tests/basic_operations.pl | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/test/tests/basic_operations.pl b/test/tests/basic_operations.pl index 5d1e565f..ea699cfa 100644 --- a/test/tests/basic_operations.pl +++ b/test/tests/basic_operations.pl @@ -808,6 +808,19 @@ 'positive_output_matches' => [qr/HMAC\sType\:\s.*SHA1/], 'rc_positive_output_matches' => [qr/KEY.*somefile/], }, + { + 'category' => 'basic operations', + 'subcategory' => 'client save rc file', + 'detail' => 'key file too long', + 'function' => \&client_rc_file, + 'cmdline' => "$client_save_rc_args -n default --get-key " . 'A'x1030, + 'save_rc_stanza' => [{'name' => 'default', + 'vars' => {'DIGEST_TYPE' => 'SHA1'}}], + 'exec_err' => $YES, + 'positive_output_matches' => [qr/Could\snot\sopen/], + 'rc_positive_output_matches' => [qr/VERBOSE.*2/], + }, + { 'category' => 'basic operations', 'subcategory' => 'client save rc file', @@ -820,6 +833,19 @@ 'positive_output_matches' => [qr/HMAC\sType\:\s.*SHA1/], 'rc_positive_output_matches' => [qr/KEY.*somefile/], }, + { + 'category' => 'basic operations', + 'subcategory' => 'client save rc file', + 'detail' => 'HMAC key file too long', + 'function' => \&client_rc_file, + 'cmdline' => "$client_save_rc_args -n default --get-hmac-key " . 'A'x1030, + 'save_rc_stanza' => [{'name' => 'default', + 'vars' => {'KEY' => 'testtest', 'DIGEST_TYPE' => 'SHA1'}}], + 'exec_err' => $YES, + 'positive_output_matches' => [qr/Could\snot\sopen/], + 'rc_positive_output_matches' => [qr/VERBOSE.*2/], + }, + { 'category' => 'basic operations', 'subcategory' => 'client save rc file',