# Check that getindices() works correctly within and across namespaces

# 004: getindices() with constant argument, from non-default namespace to the same namespace.

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

bundle common g
{
  vars:
      "array[key]" string => "string";
}

bundle agent init
{
  vars:
}

bundle agent test
{
  methods:
      "any" usebundle => test_default_namespace("g.array");
}

bundle agent test_default_namespace(array_name)
{
  vars:
      "repo_ids5" slist => getindices("$(array_name)");
}

bundle agent check
{
  methods:
      "check"  usebundle => dcs_check_strcmp("$(test_default_namespace.repo_ids5)", "key", "$(this.promise_filename)", "no");
}
