Skip to content

Commit 8410fcf

Browse files
committed
Added test for calling_bundle
Signed-off-by: Victor Moene <[email protected]>
1 parent e9b9340 commit 8410fcf

File tree

1 file changed

+65
-0
lines changed

1 file changed

+65
-0
lines changed
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Test $(this.calling_bundle)
2+
3+
body common control
4+
{
5+
inputs => { "../../default.cf.sub" };
6+
bundlesequence => { default("$(this.promise_filename)") };
7+
}
8+
9+
#######################################################
10+
11+
bundle agent init
12+
{
13+
methods:
14+
"a"
15+
usebundle => new_namespace:A,
16+
useresult => "return_var";
17+
}
18+
19+
#######################################################
20+
21+
bundle agent check
22+
{
23+
vars:
24+
"expected"
25+
string => "default:init/new_namespace:A/B";
26+
27+
classes:
28+
"ok"
29+
expression => strcmp("$(init.return_var[1])", "$(expected)");
30+
31+
reports:
32+
DEBUG::
33+
"$(this.promise_filename) expected dirname $(init.return_var[1]), actual $(expected)";
34+
35+
ok::
36+
"$(this.promise_filename) Pass";
37+
!ok::
38+
"$(this.promise_filename) FAIL";
39+
}
40+
41+
body file control
42+
{
43+
namespace => "new_namespace";
44+
}
45+
46+
47+
bundle agent A
48+
{
49+
methods:
50+
"b"
51+
usebundle => new_namespace:B,
52+
useresult => "return_var";
53+
54+
reports:
55+
"$(this.calling_bundle)/$(return_var[1])"
56+
bundle_return_value_index => "1";
57+
58+
}
59+
60+
bundle agent B
61+
{
62+
reports:
63+
"$(this.calling_bundle)/$(this.bundle)"
64+
bundle_return_value_index => "1";
65+
}

0 commit comments

Comments
 (0)