Skip to content

Commit

Permalink
tests: command inheritance test
Browse files Browse the repository at this point in the history
Some tests for the new commands inheritance feature.

Signed-off-by: Omer Caspi <omer.caspi@gmail.com>
  • Loading branch information
omercsp committed Sep 13, 2024
1 parent f963189 commit b48eb53
Show file tree
Hide file tree
Showing 12 changed files with 64 additions and 0 deletions.
30 changes: 30 additions & 0 deletions tests/tasks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,36 @@ tasks:
short_desc: Check overridden task, 2 deep
commands:
- echo main config file
base_cmds_inherit:
commands:
- echo base
043a_cmds_override:
base: base_cmds_inherit
short_desc: Check commands override
commands:
- echo derived
043b_cmds_inherit_before:
base: base_cmds_inherit
base_cmds: before
short_desc: Check commands before
commands:
- echo derived
043c_cmds_inherit_after:
base: base_cmds_inherit
base_cmds: after
short_desc: Check commands after
commands:
- echo derived
043d_cmds_inherit_ignore:
base: base_cmds_inherit
base_cmds: ignore
short_desc: Check forced ignore of commands
043e_cmds_inherit_depth_2:
base: 043b_cmds_inherit_before
base_cmds: before
commands:
- echo derived2
short_desc: Check forced ignore of commands
base_container_test:
short_desc: Basic container support
commands:
Expand Down
Empty file.
1 change: 1 addition & 0 deletions tests/xeet.expected/043a_cmds_override/stdout
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
derived
Empty file.
2 changes: 2 additions & 0 deletions tests/xeet.expected/043b_cmds_inherit_before/stdout
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
base
derived
Empty file.
2 changes: 2 additions & 0 deletions tests/xeet.expected/043c_cmds_inherit_after/stdout
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
derived
base
Empty file.
1 change: 1 addition & 0 deletions tests/xeet.expected/043d_cmds_inherit_ignore/stdout
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
No commands defined for task '043d_cmds_inherit_ignore'. Nothing to do.
Empty file.
3 changes: 3 additions & 0 deletions tests/xeet.expected/043e_cmds_inherit_depth_2/stdout
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
base
derived
derived2
25 changes: 25 additions & 0 deletions tests/xeet.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,31 @@
"name": "042_included",
"base": "test_base"
}
,{
"name": "043a_cmds_override",
"base": "test_base",
"groups": ["cmds_inherit"]
}
,{
"name": "043b_cmds_inherit_before",
"base": "test_base",
"groups": ["cmds_inherit"]
}
,{
"name": "043c_cmds_inherit_after",
"base": "test_base",
"groups": ["cmds_inherit"]
}
,{
"name": "043d_cmds_inherit_ignore",
"base": "test_base",
"groups": ["cmds_inherit"]
}
,{
"name": "043e_cmds_inherit_depth_2",
"base": "test_base",
"groups": ["cmds_inherit"]
}
,{
"name": "050a_container_ubuntu",
"base": "test_base",
Expand Down

0 comments on commit b48eb53

Please sign in to comment.