From 1de5e370e1f4b1464bfcd94c7ff4c76bbc1922bc Mon Sep 17 00:00:00 2001 From: Michael Rash Date: Sat, 16 Mar 2013 14:40:08 -0400 Subject: [PATCH] [test suite] added 'server_conf' hash key verification --- test/test-fwknop.pl | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/test/test-fwknop.pl b/test/test-fwknop.pl index 1afaaff2..36e14810 100755 --- a/test/test-fwknop.pl +++ b/test/test-fwknop.pl @@ -4217,16 +4217,21 @@ sub validate_test_hashes() { } } - ### if 'key_file' is defined, then ensure the client command line - ### references the same file + ### validate the 'key_file' and 'server_conf' hash keys for my $test_hr (@tests) { my $msg = "[$test_hr->{'category'}]"; $msg .= " [$test_hr->{'subcategory'}]" if $test_hr->{'subcategory'}; $msg .= " $test_hr->{'detail'}"; if ($test_hr->{'key_file'}) { unless ($test_hr->{'cmdline'} =~ /\s$test_hr->{'key_file'}\b/) { - die "[*] 'key_file' value not matched in " . - "client command line for: $msg"; + die "[*] 'key_file' value: '$test_hr->{'key_file'}' not matched in " . + "client command line '$test_hr->{'cmdline'}' for: $msg"; + } + } + if ($test_hr->{'server_conf'}) { + unless ($test_hr->{'fwknopd_cmdline'} =~ /\s$test_hr->{'server_conf'}\b/) { + die "[*] 'server_conf' value: '$test_hr->{'server_conf'}' not matched in " . + "server command line '$test_hr->{'fwknopd_cmdline'}' for: $msg"; } } }