@@ -266,7 +266,7 @@ e.g. ``debian-9-2019-2-py3``.
266266``bin/kitchen converge ``
267267^^^^^^^^^^^^^^^^^^^^^^^^
268268
269- Creates the docker instance and runs the ``template `` main state , ready for testing.
269+ Creates the docker instance and runs the ``openssh `` main states , ready for testing.
270270
271271``bin/kitchen verify ``
272272^^^^^^^^^^^^^^^^^^^^^^
@@ -288,3 +288,64 @@ Runs all of the stages above in one go: i.e. ``destroy`` + ``converge`` + ``veri
288288
289289Gives you SSH access to the instance for manual testing.
290290
291+ Testing with Vagrant
292+ --------------------
293+
294+ Windows/FreeBSD/OpenBSD testing is done with ``kitchen-salt ``.
295+
296+ Requirements
297+ ^^^^^^^^^^^^
298+
299+ * Ruby
300+ * Virtualbox
301+ * Vagrant
302+
303+ Setup
304+ ^^^^^
305+
306+ .. code-block :: bash
307+
308+ $ gem install bundler
309+ $ bundle install --with=vagrant
310+ $ bin/kitchen test [platform]
311+
312+ Where ``[platform] `` is the platform name defined in ``kitchen.vagrant.yml ``,
313+ e.g. ``windows-81-latest-py3 ``.
314+
315+ Note
316+ ^^^^
317+
318+ When testing using Vagrant you must set the environment variable ``KITCHEN_LOCAL_YAML `` to ``kitchen.vagrant.yml ``. For example:
319+
320+ .. code-block :: bash
321+
322+ $ KITCHEN_LOCAL_YAML=kitchen.vagrant.yml bin/kitchen test # Alternatively,
323+ $ export KITCHEN_LOCAL_YAML=kitchen.vagrant.yml
324+ $ bin/kitchen test
325+
326+ Then run the following commands as needed.
327+
328+ ``bin/kitchen converge ``
329+ ^^^^^^^^^^^^^^^^^^^^^^^^
330+
331+ Creates the Vagrant instance and runs the ``openssh `` main states, ready for testing.
332+
333+ ``bin/kitchen verify ``
334+ ^^^^^^^^^^^^^^^^^^^^^^
335+
336+ Runs the ``inspec `` tests on the actual instance.
337+
338+ ``bin/kitchen destroy ``
339+ ^^^^^^^^^^^^^^^^^^^^^^^
340+
341+ Removes the Vagrant instance.
342+
343+ ``bin/kitchen test ``
344+ ^^^^^^^^^^^^^^^^^^^^
345+
346+ Runs all of the stages above in one go: i.e. ``destroy `` + ``converge `` + ``verify `` + ``destroy ``.
347+
348+ ``bin/kitchen login ``
349+ ^^^^^^^^^^^^^^^^^^^^^
350+
351+ Gives you RDP/SSH access to the instance for manual testing.
0 commit comments