File tree Expand file tree Collapse file tree 1 file changed +61
-0
lines changed Expand file tree Collapse file tree 1 file changed +61
-0
lines changed Original file line number Diff line number Diff line change @@ -162,3 +162,64 @@ Runs all of the stages above in one go: i.e. ``destroy`` + ``converge`` + ``veri
162
162
163
163
Gives you SSH access to the instance for manual testing.
164
164
165
+ Testing with Vagrant
166
+ --------------------
167
+
168
+ Windows/FreeBSD/OpenBSD testing is done with ``kitchen-salt ``.
169
+
170
+ Requirements
171
+ ^^^^^^^^^^^^
172
+
173
+ * Ruby
174
+ * Virtualbox
175
+ * Vagrant
176
+
177
+ Setup
178
+ ^^^^^
179
+
180
+ .. code-block :: bash
181
+
182
+ $ gem install bundler
183
+ $ bundle install --with=vagrant
184
+ $ bin/kitchen test [platform]
185
+
186
+ Where ``[platform] `` is the platform name defined in ``kitchen.vagrant.yml ``,
187
+ e.g. ``windows-81-latest-py3 ``.
188
+
189
+ Note
190
+ ^^^^
191
+
192
+ When testing using Vagrant you must set the environment variable ``KITCHEN_LOCAL_YAML `` to ``kitchen.vagrant.yml ``. For example:
193
+
194
+ .. code-block :: bash
195
+
196
+ $ KITCHEN_LOCAL_YAML=kitchen.vagrant.yml bin/kitchen test # Alternatively,
197
+ $ export KITCHEN_LOCAL_YAML=kitchen.vagrant.yml
198
+ $ bin/kitchen test
199
+
200
+ Then run the following commands as needed.
201
+
202
+ ``bin/kitchen converge ``
203
+ ^^^^^^^^^^^^^^^^^^^^^^^^
204
+
205
+ Creates the Vagrant instance and runs the ``vault `` main states, ready for testing.
206
+
207
+ ``bin/kitchen verify ``
208
+ ^^^^^^^^^^^^^^^^^^^^^^
209
+
210
+ Runs the ``inspec `` tests on the actual instance.
211
+
212
+ ``bin/kitchen destroy ``
213
+ ^^^^^^^^^^^^^^^^^^^^^^^
214
+
215
+ Removes the Vagrant instance.
216
+
217
+ ``bin/kitchen test ``
218
+ ^^^^^^^^^^^^^^^^^^^^
219
+
220
+ Runs all of the stages above in one go: i.e. ``destroy `` + ``converge `` + ``verify `` + ``destroy ``.
221
+
222
+ ``bin/kitchen login ``
223
+ ^^^^^^^^^^^^^^^^^^^^^
224
+
225
+ Gives you RDP/SSH access to the instance for manual testing.
You can’t perform that action at this time.
0 commit comments