File tree Expand file tree Collapse file tree 1 file changed +62
-0
lines changed Expand file tree Collapse file tree 1 file changed +62
-0
lines changed Original file line number Diff line number Diff line change @@ -131,3 +131,65 @@ Runs all of the stages above in one go: i.e. ``destroy`` + ``converge`` + ``veri
131
131
^^^^^^^^^^^^^^^^^^^^^
132
132
133
133
Gives you SSH access to the instance for manual testing.
134
+
135
+ Testing with Vagrant
136
+ --------------------
137
+
138
+ Windows testing is done with ``kitchen-salt ``.
139
+
140
+ Requirements
141
+ ^^^^^^^^^^^^
142
+
143
+ * Ruby
144
+ * Virtualbox
145
+ * Vagrant
146
+
147
+ Setup
148
+ ^^^^^
149
+
150
+ .. code-block :: bash
151
+
152
+ $ gem install bundler
153
+ $ bundle install --with=vagrant
154
+ $ bin/kitchen test [platform]
155
+
156
+ Where ``[platform] `` is the platform name defined in ``kitchen.yml ``,
157
+ e.g. ``windows-81-2019-2-py3 ``.
158
+
159
+ Note
160
+ ^^^^
161
+
162
+ When testing using Vagrant you must set the environment variable ``KITCHEN_LOCAL_YAML `` to ``kitchen.vagrant.yml ``. For example:
163
+
164
+ .. code-block :: bash
165
+
166
+ $ KITCHEN_LOCAL_YAML=kitchen.vagrant.yml bin/kitchen test # Alternatively,
167
+ $ export KITCHEN_LOCAL_YAML=kitchen.vagrant.yml
168
+ $ bin/kitchen test
169
+
170
+ Then run the following commands as needed.
171
+
172
+ ``bin/kitchen converge ``
173
+ ^^^^^^^^^^^^^^^^^^^^^^^^
174
+
175
+ Creates the Vagrant instance and runs the ``openvpn `` main state, ready for testing.
176
+
177
+ ``bin/kitchen verify ``
178
+ ^^^^^^^^^^^^^^^^^^^^^^
179
+
180
+ Runs the ``inspec `` tests on the actual instance.
181
+
182
+ ``bin/kitchen destroy ``
183
+ ^^^^^^^^^^^^^^^^^^^^^^^
184
+
185
+ Removes the Vagrant instance.
186
+
187
+ ``bin/kitchen test ``
188
+ ^^^^^^^^^^^^^^^^^^^^
189
+
190
+ Runs all of the stages above in one go: i.e. ``destroy `` + ``converge `` + ``verify `` + ``destroy ``.
191
+
192
+ ``bin/kitchen login ``
193
+ ^^^^^^^^^^^^^^^^^^^^^
194
+
195
+ Gives you RDP access to the instance for manual testing.
You can’t perform that action at this time.
0 commit comments