diff options
Diffstat (limited to 'vmdb2.md')
-rw-r--r-- | vmdb2.md | 40 |
1 files changed, 13 insertions, 27 deletions
@@ -258,12 +258,10 @@ kind of testing, and that the teardown field in the step is implemented by the echo step. It's not a generic feature. ~~~scenario -given a specification file called happy.vmdb -when user runs vmdb2 -v happy.vmdb --output=happy.img +given file happy.vmdb +when I run vmdb2 -v happy.vmdb --output=happy.img then exit code is 0 -and stdout contains "foo" followed by "bar" -and stdout contains "bar" followed by "bar_teardown" -and stdout contains "bar_teardown" followed by "foo_teardown" +then stdout contains "foo\nbar\nbar_teardown\n" ~~~ ~~~{.file #happy.vmdb .yaml .numberLines} @@ -285,10 +283,10 @@ outputs the image file name given by the user. A more realistic specification file would instead do thing like create the file. ~~~scenario -given a specification file called j2.vmdb -when user runs vmdb2 -v j2.vmdb --output=foo.img +given file j2.vmdb +when I run vmdb2 -v j2.vmdb --output=foo.img then exit code is 0 -and stdout contains "image is foo.img" followed by "bar" +then stdout contains "image is foo.img\nbar" ~~~ ~~~{.file #j2.vmdb .yaml .numberLines} @@ -305,14 +303,14 @@ in the right order then? This scenario uses the "error" step provided for testing this kind of thing. ~~~scenario -given a specification file called unhappy.vmdb -when user runs vmdb2 -v unhappy.vmdb --output=unhappy.img +given file unhappy.vmdb +when I try to run vmdb2 -v unhappy.vmdb --output=unhappy.img then exit code is 1 -and stdout contains "foo" followed by "yikes" -and stdout contains "yikes" followed by "WAT?!" -and stdout contains "WAT?!" followed by "foo_teardown" -and stdout does NOT contain "bar_step" -and stdout does NOT contain "bar_teardown" +then stdout contains "foo\nyikes\n" +then stdout contains "WAT?!\n" +then stdout contains "foo_teardown\n" +then stdout doesn't contain "bar_step" +then stdout doesn't contain "bar_teardown" ~~~ ~~~{.file #unhappy.vmdb .yaml .numberLines} @@ -326,15 +324,3 @@ steps: ~~~ -# Step reference manual - - ---- -title: Building Debian system images with vmdb2 -author: Lars Wirzenius -bindings: vmdb2.yaml -functions: vmdb2.py -template: python -documentclass: report -... - |