summaryrefslogtreecommitdiff
path: root/vmadm.md
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2022-01-21 08:58:47 +0200
committerLars Wirzenius <liw@liw.fi>2022-01-21 08:58:47 +0200
commit1fd70189973f247c4fab3e426151cda4e912e8ed (patch)
treea53e82bca6e7e53c1ce0f30112aba60f26f9e48e /vmadm.md
parentaeabf043ae323bdb7b644a22ecd93a4658862c06 (diff)
downloadvmadm-1fd70189973f247c4fab3e426151cda4e912e8ed.tar.gz
refactor: use lib/runcmd's steps instead of custom ones
Subplot's lib/runcmd provides a "when I run ..." step that we can use, instead of having a custom "when I invoke ..." step. Less code, fewer bugs. Sponsored-by: author
Diffstat (limited to 'vmadm.md')
-rw-r--r--vmadm.md25
1 files changed, 13 insertions, 12 deletions
diff --git a/vmadm.md b/vmadm.md
index 1db6307..8bfd476 100644
--- a/vmadm.md
+++ b/vmadm.md
@@ -162,7 +162,7 @@ given file config.yaml
given file .ssh/id_rsa.pub from init_ssh_key_pub
given file expected/init-test/meta-data from init-metadata
given file expected/init-test/user-data from init-userdata
-when I invoke vmadm cloud-init --config config.yaml init.yaml actual
+when I run vmadm cloud-init --config config.yaml init.yaml actual
then directories actual/init-test and expected/init-test are identical
~~~
@@ -228,17 +228,18 @@ given file .ssh/id_rsa from ssh_key
given file .ssh/id_rsa.pub from ssh_key_pub
given file .ssh/config from ssh_config
given file .ssh/known_hosts from known_hosts
+when I run chmod -R u=rwX,go= .ssh
~~~
Then we create the VM, and verify that we can log in.
~~~scenario
-when I invoke vmadm new --config config.yaml smoke.yaml
-when I invoke ssh -F .ssh/config debian@smoke hostname
+when I run vmadm new --config config.yaml smoke.yaml
+when I run ssh -F .ssh/config debian@smoke hostname
then stdout contains "smoke"
-when I invoke ssh -F .ssh/config debian@smoke df -h /
+when I run ssh -F .ssh/config debian@smoke df -h /
then stdout matches regex 4\.\dG
-when I invoke ssh -F .ssh/config debian@smoke free -m
+when I run ssh -F .ssh/config debian@smoke free -m
then stdout matches regex Mem:\s+19\d\d\s
~~~
@@ -246,24 +247,24 @@ Then we shut it down, twice. The second time is to verify shutting
down works even if the VM is already shut down.
~~~scenario
-when I invoke vmadm shutdown --config config.yaml smoke.yaml
-when I invoke vmadm shutdown --config config.yaml smoke.yaml
+when I run vmadm shutdown --config config.yaml smoke.yaml
+when I run vmadm shutdown --config config.yaml smoke.yaml
~~~
Then we start it back up again and verify we can log in. Then we start
it again, while it's already running, to verify that that works.
~~~scenario
-when I invoke vmadm start --config config.yaml smoke.yaml
-when I invoke ssh -F .ssh/config debian@smoke hostname
-when I invoke vmadm start --config config.yaml smoke.yaml
+when I run vmadm start --config config.yaml smoke.yaml
+when I run ssh -F .ssh/config debian@smoke hostname
+when I run vmadm start --config config.yaml smoke.yaml
~~~
Finally, we delete it twice.
~~~scenario
-when I invoke vmadm delete --config config.yaml smoke.yaml
-when I invoke vmadm delete --config config.yaml smoke.yaml
+when I run vmadm delete --config config.yaml smoke.yaml
+when I run vmadm delete --config config.yaml smoke.yaml
~~~