diff --git a/test/tests/basic_operations.pl b/test/tests/basic_operations.pl index b583b772..910970b4 100644 --- a/test/tests/basic_operations.pl +++ b/test/tests/basic_operations.pl @@ -403,6 +403,43 @@ 'positive_output_matches' => [qr/Digest\sType\:\s.*SHA512/], 'rc_positive_output_matches' => [qr/DIGEST_TYPE.*SHA512/], }, + { + 'category' => 'basic operations', + 'subcategory' => 'client save rc file', + 'detail' => '--use-hmac', + 'function' => \&client_rc_file, + 'cmdline' => "$client_save_rc_args --use-hmac -n default", + 'save_rc_stanza' => [{'name' => 'default', + 'vars' => {'KEY' => 'testtest', 'HMAC_KEY' => 'hmactest', + 'HMAC_DIGEST_TYPE' => 'SHA1'}}], + 'positive_output_matches' => [qr/HMAC\sType\:\s.*SHA1/], + 'rc_positive_output_matches' => [qw/USE_HMAC.*Y/], + }, + { + 'category' => 'basic operations', + 'subcategory' => 'client save rc file', + 'detail' => '--get-key', + 'function' => \&client_rc_file, + 'cmdline' => "$client_save_rc_args -n default --get-key somefile", + 'save_rc_stanza' => [{'name' => 'default', + 'vars' => {'KEY' => 'testtest', 'HMAC_KEY' => 'hmactest', + 'HMAC_DIGEST_TYPE' => 'SHA1'}}], + 'positive_output_matches' => [qr/HMAC\sType\:\s.*SHA1/], + 'rc_positive_output_matches' => [qw/KEY.*somefile/], + }, + { + 'category' => 'basic operations', + 'subcategory' => 'client save rc file', + 'detail' => '--get-hmac-key', + 'function' => \&client_rc_file, + 'cmdline' => "$client_save_rc_args -n default --get-hmac-key somefile", + 'save_rc_stanza' => [{'name' => 'default', + 'vars' => {'KEY' => 'testtest', 'HMAC_KEY' => 'hmactest', + 'HMAC_DIGEST_TYPE' => 'SHA1'}}], + 'positive_output_matches' => [qr/HMAC\sType\:\s.*SHA1/], + 'rc_positive_output_matches' => [qw/KEY.*somefile/], + }, + { 'category' => 'basic operations', 'subcategory' => 'client save rc file',