* Added new test to validate --stanza-list
authorFranck Joncourt <franck@debian.org>
Tue, 30 Jul 2013 20:54:10 +0000 (22:54 +0200)
committerFranck Joncourt <franck@debian.org>
Tue, 30 Jul 2013 20:54:10 +0000 (22:54 +0200)
test/conf/fwknoprc_stanza_list [new file with mode: 0644]
test/test-fwknop.pl
test/tests/basic_operations.pl

diff --git a/test/conf/fwknoprc_stanza_list b/test/conf/fwknoprc_stanza_list
new file mode 100644 (file)
index 0000000..36dcd9f
--- /dev/null
@@ -0,0 +1,8 @@
+[default]
+KEY    testkey
+
+[stanza_1]
+KEY    testkey_1
+
+[stanza_2]
+KEY    testkey_2
index 1e81a6c..d818ab2 100755 (executable)
@@ -140,6 +140,7 @@ our %cf = (
     'rc_hmac_sha512_key'           => "$conf_dir/fwknoprc_hmac_sha512_key",
     'rc_hmac_sha512_short_key'     => "$conf_dir/fwknoprc_hmac_sha512_short_key",
     'rc_hmac_sha512_long_key'      => "$conf_dir/fwknoprc_hmac_sha512_long_key",
+    'rc_stanza_list'               => "$conf_dir/fwknoprc_stanza_list",
     'base64_key_access'            => "$conf_dir/base64_key_access.conf",
     'custom_input_chain'           => "$conf_dir/custom_input_chain_fwknopd.conf",
     'custom_nat_chain'             => "$conf_dir/custom_nat_chain_fwknopd.conf",
index d00d7fc..404c92b 100644 (file)
         'positive_output_matches' => [qr/Value\s.*out\sof\srange/],
         'fatal'    => $NO
     },
+    {
+        'category' => 'basic operations',
+        'subcategory' => 'client',
+        'detail'   => '--stanza-list',
+        'function' => \&generic_exec,
+        'cmdline'  => $default_client_args . " --stanza-list --rc-file $cf{'rc_stanza_list'}",
+        'positive_output_matches' => [qr/The\sfollowing\sstanzas\sare\sconfigured/i, qr/stanza_1/, qr/stanza_2/],
+        'negative_output_matches' => [qr/default/],
+        'fatal'    => $NO
+    },
 );