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