github.com/upcmd/up@v0.8.1-0.20230108151705-ad8b797bf04f/tests/functests/c0132.yml (about)

     1  doc_meta: |
     2    folder: test-debug
     3    title: assert and inspect
     4    head: |
     5      Demo you can use assert and inspect
     6  
     7    sections:
     8      - title: assert
     9        content: |
    10          It will go through a list of criteria and show the evaluation result
    11  
    12      - title: inspect
    13        content: |
    14          It allows you to inspect below:
    15  
    16          1. exec_vars: The runtime execution vars for current func
    17          2. exec_base_vars: it is the base vars which its func inherit from as base
    18  
    19      - title: Demo
    20        log: yes
    21  
    22  
    23  notes:
    24    goal:
    25      - add assert for testing
    26      - add inspect for debugging
    27  
    28  vars:
    29    a: global_aaa
    30    b: global_bbb
    31    c: global_ccc
    32  
    33  tasks:
    34    - name: task
    35      task:
    36  
    37        - func: block
    38          vars:
    39            a: local_aaa
    40            b: local_bbb
    41          dvars:
    42            - name: da
    43              value: local_da
    44            - name: db
    45              value: local_db
    46          do:
    47            - func: cmd
    48              vars:
    49                a: block_layer2_aaa
    50              do:
    51                -
    52                  name: assert
    53                  cmd:
    54                    - '{{eq .a "aaa"}}'
    55                    - '{{eq .a "block_layer2_aaa"}}'
    56  
    57                -
    58                  name: assert
    59                  cmd:
    60                    - '{{eq .a "aaa"}}'
    61  
    62                -
    63                  name: inspect
    64                  cmd:
    65                    - exec_vars
    66                    - exec_base_vars
    67