github.com/upcmd/up@v0.8.1-0.20230108151705-ad8b797bf04f/tests/functests/c0159.yml (about) 1 doc_meta: | 2 folder: block-func 3 title: test case 1 4 head: | 5 Test the block-func being used in callee 6 7 sections: 8 - title: Demo 9 log: yes 10 11 12 tasks: 13 - 14 name: task 15 task: 16 - 17 func: call 18 desc: | 19 test var overriding in sub_task 20 vars: 21 aaa: var_a_from_task 22 do: 23 - sub_task 24 25 - 26 name: sub_task 27 task: 28 - 29 func: cmd 30 desc: | 31 inspect if the correct parameter has been passed in correctly 32 without default value 33 do: 34 - name: assert 35 cmd: 36 - '{{eq .aaa "var_a_from_task"}}' 37 38 - 39 func: block 40 do: 41 - 42 func: cmd 43 desc: | 44 inspect if the correct parameter has been passed in correctly 45 without default value 46 in block func 47 do: 48 - name: assert 49 cmd: 50 - '{{eq .aaa "var_a_from_task"}}' 51 52 - 53 func: cmd 54 desc: | 55 inspect if the correct parameter has been passed in correctly 56 with default value 57 vars: 58 aaa: var_a_from_sub_task 59 do: 60 - name: assert 61 cmd: 62 - '{{eq .aaa "var_a_from_task"}}' 63 64 - 65 func: block 66 vars: 67 aaa: var_a_from_sub_task 68 do: 69 - 70 func: cmd 71 desc: | 72 inspect if the correct parameter has been passed in correctly 73 with default value 74 in block func 75 do: 76 - name: assert 77 cmd: 78 - '{{eq .aaa "var_a_from_task"}}'