VMware: Add writing new tests subsection to vmware_guidelines (#60163)
* Add writing new tests subsection to vmware_guidelines Specifically address use of the prepare_vmware_tests role Point to common vars for use by test writers Co-Authored-By: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
parent
602aded6ec
commit
1d6bce961c
1 changed files with 18 additions and 0 deletions
|
@ -181,6 +181,24 @@ Depending upon the functionality provided by ESXi or vCenter, some modules can s
|
|||
Functional tests
|
||||
----------------
|
||||
|
||||
Writing new tests
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
If you are writing a new collection of integration tests, there are a few VMware-specific things to note beyond
|
||||
the standard Ansible :ref:`integration testing<testing_integration>` process.
|
||||
|
||||
The test-suite uses a set of common, pre-defined vars located in the :file:`test/integration/targets/prepare_vmware_tests/` role.
|
||||
The resources defined there are automatically created by importing that role at the start of your test:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
- import_role:
|
||||
name: prepare_vmware_tests
|
||||
vars:
|
||||
setup_datacenter: true
|
||||
|
||||
This will give you a ready to use cluster, datacenter, datastores, folder, switch, dvswitch, ESXi hosts, and VMs.
|
||||
|
||||
No need to create too much resources
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
|
Loading…
Reference in a new issue