# you can run this test directly with

# CFENGINE_TEST_OVERRIDE_PROCDIR=`pwd`/00_basics/environment/proc testall 00_basics/environment/proc-net-functions.cf.sub

body common control
{
    inputs => { "../../default.sub.cf" };
    bundlesequence => { default($(this.promise_filename)) };
    version => "1.0";
}

bundle agent test
{
  vars:
      "connections" data => network_connections();
}

bundle agent check
{
  vars:
      "testname" string => regex_replace($(this.promise_filename), "\\.sub$", "", "");

  methods:
      "check"  usebundle => dcs_check_state(test,
                                           "$(this.promise_filename).expected.json",
                                           $(testname));

    test_debug::
      "check"  usebundle => dcs_check_state(test,
                                           "$(this.promise_filename).expected.json",
                                           $(this.promise_filename));
}
