Skip to content

Feature Request: Replacing should_* with nested tests #7

Open
@dudleycodes

Description

@dudleycodes

It would be great if we could treat the whole idea of should_echo as kind of a sub-test, kick-off, rather than a test in and of itself!

If you think about it, the root tests are kicked off via execute: docker run --rm -it ubuntu /bin/bash. We then look at the output for strings we want and strings we don't want.

Entries like should_echo, essentially just run another command (via standard in) -- but if it was a nested test, then we could do several checks just like we do at the root level.

For example, imagine yaml like:

target: 
	execute: docker run --rm -it ubuntu /bin/ash    # <------ THIS IS THE COMMAND THE KICKS OFF THE "ROOT" TEST
		should_lack:     # <---- NOTICE THIS IS NOW NESTED UNDERNEATH EXECUTE
			 - string1
			 - string 2
			 - string 3
		should_have:
			- string 4
			- string 5
			- string 6
		
		execute:	# <----- THIS EXECUTE IS NESTED UNDEARNEATH THE ROOT ONE, EXECUTING A FIRST "SUB TEST"
			should_lack:
				- string 7
				- string 8
				- string 9
			should_have:
				- string 10
				- string 11
				- string 12
				
				execute: 		# <----- THIS EXECUTE IS A SUB TASK TO THE FIRST SUB TASK
					- should_have
						- file 19
					- should_lack
						- file 20
				
			
		execute:	# <----- THIS EXECUTE IS NESTED UNDEARNEATH THE ROOT ONE, EXECUTING A SECOND "SUB TEST"
			should_lack:
				- string 13
				- string 14
				- string 15
			should_have:
				- string 16
				- string 17
				- string 18

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions