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