File tree Expand file tree Collapse file tree 1 file changed +60
-0
lines changed Expand file tree Collapse file tree 1 file changed +60
-0
lines changed Original file line number Diff line number Diff line change @@ -292,3 +292,63 @@ Runs all of the stages above in one go: i.e. ``destroy`` + ``converge`` + ``veri
292292^^^^^^^^^^^^^^^^^^^^^
293293
294294Gives you SSH access to the instance for manual testing.
295+
296+ Testing with Vagrant
297+ --------------------
298+
299+ Windows/FreeBSD/OpenBSD testing is done with ``kitchen-salt ``.
300+
301+ Requirements
302+ ^^^^^^^^^^^^
303+
304+ * Ruby
305+ * Virtualbox
306+ * Vagrant
307+
308+ Setup
309+ ^^^^^
310+
311+ .. code-block :: bash
312+
313+ $ gem install bundler
314+ $ bundle install --with=vagrant
315+ $ bin/kitchen test [platform]
316+
317+ Where ``[platform] `` is the platform name defined in ``kitchen.yml ``,
318+ e.g. ``windows-81-2019-2-py3 ``.
319+
320+ Note
321+ ^^^^
322+
323+ When testing using Vagrant you must set the environment variable ``KITCHEN_LOCAL_YAML `` to ``kitchen.vagrant.yml ``. For example:
324+
325+ .. code-block :: bash
326+
327+ $ KITCHEN_LOCAL_YAML=kitchen.vagrant.yml bin/kitchen test # Alternatively,
328+ $ export KITCHEN_LOCAL_YAML=kitchen.vagrant.yml
329+ $ bin/kitchen test
330+
331+ Then run the following commands as needed.
332+
333+ ``bin/kitchen converge ``
334+ ^^^^^^^^^^^^^^^^^^^^^^^^
335+
336+ Creates the Vagrant instance and runs the ``openvpn `` main state, ready for testing.
337+
338+ ``bin/kitchen verify ``
339+ ^^^^^^^^^^^^^^^^^^^^^^
340+
341+ Runs the ``inspec `` tests on the actual instance.
342+
343+ ``bin/kitchen destroy ``
344+ ^^^^^^^^^^^^^^^^^^^^^^^
345+
346+ Removes the Vagrant instance.
347+
348+ ``bin/kitchen test ``
349+ ^^^^^^^^^^^^^^^^^^^^
350+
351+ Runs all of the stages above in one go: i.e. ``destroy `` + ``converge `` + ``verify `` + ``destroy ``.
352+
353+ ``bin/kitchen login ``
354+ ^^^^^^^^^^^^^^^^^^^^^
You can’t perform that action at this time.
0 commit comments