-
Notifications
You must be signed in to change notification settings - Fork 35
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
Add automated tests for demo code snippets #7
Commits on Sep 3, 2019
-
Add script to run demo code in README
Add a script that extracts the demo code snippets from README.md and runs them in a shell, raising `SystemExit`, if the output is not as expected. This is an automated testing alternative to the existing `run_demo.py`, which replicates the commands from the demo instructions, with the advantage that the commands don't have to be synced. NOTE: The script requires the in-toto version specified in requirements.txt, i.e. 0.2.3 at the moment.
Configuration menu - View commit details
-
Copy full SHA for 56681ac - Browse repository at this point
Copy the full SHA 56681acView commit details -
Adopt README.md to work with snippet run script
Adopt demo instructions to be used with newly created script that extracts snippets from fenced code blocks and runs them. This commit marks to snippets for exclusion, by specifying the snippet language, used for syntax highlighting, as `bash` (`run_demo_md.py` only extracts `shell` snippets). Plus some minor cleanup.
Configuration menu - View commit details
-
Copy full SHA for 1452b4f - Browse repository at this point
Copy the full SHA 1452b4fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 945cbd8 - Browse repository at this point
Copy the full SHA 945cbd8View commit details -
Exclude
tree
from automated demo script`tree` behaves (sorts) differently on different platforms, which is a problem, when testing against an expected output.
Configuration menu - View commit details
-
Copy full SHA for 44a55a0 - Browse repository at this point
Copy the full SHA 44a55a0View commit details -
Configuration menu - View commit details
-
Copy full SHA for bb31968 - Browse repository at this point
Copy the full SHA bb31968View commit details -
Bump in-toto pinned requirement to 0.3.0
Requires changes in the expected output of the automated demo run script.
Configuration menu - View commit details
-
Copy full SHA for 0eb5ce8 - Browse repository at this point
Copy the full SHA 0eb5ce8View commit details -
Explicitly set xtrace format with PS4
This is necessary to get the same output in different environments, which in turn is necessary to compare it to hardcoded expected output.
Configuration menu - View commit details
-
Copy full SHA for 636dfa1 - Browse repository at this point
Copy the full SHA 636dfa1View commit details -
Remove unnecessary quotes around echo argument
These are treated differently with `set -x` on different systems and thus break the build E.g. on Travis (ubuntu): `+ echo something evil` and locally: `+ echo 'something evil'`
Configuration menu - View commit details
-
Copy full SHA for f59562a - Browse repository at this point
Copy the full SHA f59562aView commit details -
Configuration menu - View commit details
-
Copy full SHA for ce12147 - Browse repository at this point
Copy the full SHA ce12147View commit details -
Change "sane" to "genuine" in README.md
Kudos to @CameronLonsdale and @adityasaky for pointing it out.
Configuration menu - View commit details
-
Copy full SHA for 1b78ec7 - Browse repository at this point
Copy the full SHA 1b78ec7View commit details