Skip to content

Commit 80cce57

Browse files
committed
docs: add steps required for testing using Vagrant
1 parent d2575e2 commit 80cce57

File tree

1 file changed

+27
-8
lines changed

1 file changed

+27
-8
lines changed

docs/README.rst

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Configures OpenVPN GUI (Windows only). Sets global registry settings as describe
6868
Manages TAP-Windows device adapters (Windows only). Ensures that any devices specified with ``dev_node`` in pillar exist.
6969

7070
``openvpn.ifconfig_pool_persist``
71-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
71+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7272

7373
Installs and configures an ifconfig_pool_persist file. Used to assign host IPs.
7474

@@ -85,23 +85,32 @@ See *openvpn/pillar.example*.
8585
Notes
8686
-----
8787

88-
This formula does can optionally deploy certificates and keys, but does not generate them. This must be done manually or with another formula.
88+
This formula can optionally deploy certificates and keys, but does not generate them. This must be done manually or with another formula.
8989

9090
Testing
9191
-------
9292

93-
Linux testing is done with ``kitchen-salt``.
93+
Integration testing is done using `Kitchen <https://kitchen.ci/>`_ using the provisioner `kitchen-salt <https://github.com/saltstack/kitchen-salt>`_.
9494

9595
Requirements
9696
^^^^^^^^^^^^
9797

9898
* Ruby
9999
* Docker
100100

101+
When testing platforms other than Linux:
102+
103+
* Vagrant
104+
* Virtualbox
105+
106+
Setup
107+
^^^^^
108+
101109
.. code-block:: bash
102110
103111
$ gem install bundler
104-
$ bundle install
112+
$ bundle install # Alternatively,
113+
$ bundle install --with=vagrant # When testing using Vagrant
105114
$ bin/kitchen test [platform]
106115
107116
Where ``[platform]`` is the platform name defined in ``kitchen.yml``,
@@ -110,17 +119,17 @@ e.g. ``debian-9-2019-2-py3``.
110119
``bin/kitchen converge``
111120
^^^^^^^^^^^^^^^^^^^^^^^^
112121

113-
Creates the docker instance and runs the ``openvpn`` main state, ready for testing.
122+
Creates the test instance and runs the ``openvpn`` main state, ready for testing.
114123

115124
``bin/kitchen verify``
116125
^^^^^^^^^^^^^^^^^^^^^^
117126

118-
Runs the ``inspec`` tests on the actual instance.
127+
Runs the ``inspec`` tests on the test instance.
119128

120129
``bin/kitchen destroy``
121130
^^^^^^^^^^^^^^^^^^^^^^^
122131

123-
Removes the docker instance.
132+
Stops and destroys the test instance.
124133

125134
``bin/kitchen test``
126135
^^^^^^^^^^^^^^^^^^^^
@@ -130,4 +139,14 @@ Runs all of the stages above in one go: i.e. ``destroy`` + ``converge`` + ``veri
130139
``bin/kitchen login``
131140
^^^^^^^^^^^^^^^^^^^^^
132141

133-
Gives you SSH access to the instance for manual testing.
142+
Gives you SSH/RDP access to the instance for manual testing.
143+
144+
Note
145+
^^^^
146+
When testing using Vagrant you must set the environment variable ``KITCHEN_LOCAL_YAML`` to ``kitchen.vagrant.yml``. For example:
147+
148+
.. code-block:: bash
149+
150+
$ KITCHEN_LOCAL_YAML=kitchen.vagrant.yml bin/kitchen test # Alternatively,
151+
$ export KITCHEN_LOCAL_YAML=kitchen.vagrant.yml
152+
$ bin/kitchen test

0 commit comments

Comments
 (0)