Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openssh-formula
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
salt
openssh-formula
Commits
2f8c31c6
Unverified
Commit
2f8c31c6
authored
4 years ago
by
Imran Iqbal
Browse files
Options
Downloads
Patches
Plain Diff
docs(readme): add `Testing with Vagrant` section
parent
28685605
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/README.rst
+62
-1
62 additions, 1 deletion
docs/README.rst
with
62 additions
and
1 deletion
docs/README.rst
+
62
−
1
View file @
2f8c31c6
...
@@ -266,7 +266,7 @@ e.g. ``debian-9-2019-2-py3``.
...
@@ -266,7 +266,7 @@ e.g. ``debian-9-2019-2-py3``.
``bin/kitchen converge``
``bin/kitchen converge``
^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^
Creates the docker instance and runs the ``
template
`` main state, ready for testing.
Creates the docker instance and runs the ``
openssh
`` main state
s
, ready for testing.
``bin/kitchen verify``
``bin/kitchen verify``
^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^
...
@@ -288,3 +288,64 @@ Runs all of the stages above in one go: i.e. ``destroy`` + ``converge`` + ``veri
...
@@ -288,3 +288,64 @@ Runs all of the stages above in one go: i.e. ``destroy`` + ``converge`` + ``veri
Gives you SSH access to the instance for manual testing.
Gives you SSH access to the instance for manual testing.
Testing with Vagrant
--------------------
Windows/FreeBSD/OpenBSD testing is done with ``kitchen-salt``.
Requirements
^^^^^^^^^^^^
* Ruby
* Virtualbox
* Vagrant
Setup
^^^^^
.. code-block:: bash
$ gem install bundler
$ bundle install --with=vagrant
$ bin/kitchen test [platform]
Where ``[platform]`` is the platform name defined in ``kitchen.vagrant.yml``,
e.g. ``windows-81-latest-py3``.
Note
^^^^
When testing using Vagrant you must set the environment variable ``KITCHEN_LOCAL_YAML`` to ``kitchen.vagrant.yml``. For example:
.. code-block:: bash
$ KITCHEN_LOCAL_YAML=kitchen.vagrant.yml bin/kitchen test # Alternatively,
$ export KITCHEN_LOCAL_YAML=kitchen.vagrant.yml
$ bin/kitchen test
Then run the following commands as needed.
``bin/kitchen converge``
^^^^^^^^^^^^^^^^^^^^^^^^
Creates the Vagrant instance and runs the ``openssh`` main states, ready for testing.
``bin/kitchen verify``
^^^^^^^^^^^^^^^^^^^^^^
Runs the ``inspec`` tests on the actual instance.
``bin/kitchen destroy``
^^^^^^^^^^^^^^^^^^^^^^^
Removes the Vagrant instance.
``bin/kitchen test``
^^^^^^^^^^^^^^^^^^^^
Runs all of the stages above in one go: i.e. ``destroy`` + ``converge`` + ``verify`` + ``destroy``.
``bin/kitchen login``
^^^^^^^^^^^^^^^^^^^^^
Gives you RDP/SSH access to the instance for manual testing.
This diff is collapsed.
Click to expand it.
Dennis Ahrens
@ahrensde
mentioned in commit
48d53974
·
3 years ago
mentioned in commit
48d53974
mentioned in commit 48d539746d68f1ec52509edd82544c569ed43b9d
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment