• source navigation  • diff markup  • identifier search  • freetext search  • 

Sources/firewall4/tests/06_includes/03_script_includes

  1 Testing the execution of include scripts.
  2 
  3 -- Testcase --
  4 {%
  5         include("./root/usr/share/firewall4/main.uc", {
  6                 TRACE_CALLS: "stderr",
  7 
  8                 getenv: function(varname) {
  9                         switch (varname) {
 10                         case 'ACTION':
 11                                 return 'includes';
 12                         }
 13                 }
 14         })
 15 %}
 16 -- End --
 17 
 18 -- File fs/open~_var_run_fw4_state.txt --
 19 {
 20         "includes": [
 21                 {
 22                         "enabled": true,
 23                         "path": "/usr/share/miniupnpd/firewall.include",
 24                         "type": "script",
 25                         "fw4_compatible": true,
 26                         "position": "table-append"
 27                 },
 28 
 29                 {
 30                         "enabled": true,
 31                         "path": "/etc/example.sh",
 32                         "type": "script",
 33                         "fw4_compatible": true,
 34                         "position": "table-append"
 35                 }
 36         ]
 37 }
 38 -- End --
 39 
 40 -- Expect stderr --
 41 [call] fs.open path </var/run/fw4.state> mode <r>
 42 [call] system command <[ "sh", "-c", "exec 1000>&-; config() { echo \"You cannot use UCI in firewall in..." ]> timeout <30000>
 43 [call] system command <[ "sh", "-c", "exec 1000>&-; config() { echo \"You cannot use UCI in firewall in..." ]> timeout <30000>
 44 -- End --

This page was automatically generated by LXR 0.3.1.  •  OpenWrt