Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Replacing should_* with nested tests #7

Open
dudleycodes opened this issue Oct 8, 2022 · 0 comments
Open

Feature Request: Replacing should_* with nested tests #7

dudleycodes opened this issue Oct 8, 2022 · 0 comments
Assignees

Comments

@dudleycodes
Copy link
Member

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants