Debian Codegraph @

ansible_collections/community/vmware/testing.md

raw
1 # Testing Ansible Collection: community.vmware
2
3 ### Testing with `ansible-test`
4
5 Clone the collection and install it manually:
6
7 ```
8 $ mkdir -p ~/.ansible/collections/ansible_collections/community
9 $ git clone https://github.com/ansible-collections/community.vmware ~/.ansible/collections/ansible_collections/community/vmware
10 $ cd ~/.ansible/collections/ansible_collections/community/vmware
11 ```
12
13 If you want to test a PR, you can get it after cloning like this:
14
15 ```
16 $ git fetch origin pull/ID/head:BRANCHNAME
17 $ git checkout BRANCHNAME
18 ```
19
20 Prepare VMware configuration file:
21
22 ```
23 $ cat tests/integration/cloud-config-vcenter.ini
24 [DEFAULT]
25 vcenter_username: [email protected]
26 vcenter_password: mySuperSecretPassw0rd!
27 vcenter_hostname: vcenter.test
28 vmware_validate_certs: false
29 esxi1_username: zuul
30 esxi1_hostname: esxi1.test
31 esxi1_password: myEsxiSuperSecretPassw0rd!
32 ```
33
34 Run `ansible-test`:
35
36 ```
37 $ VMWARE_TEST_PLATFORM=static ansible-test integration --diff --no-temp-workdir --python 3.7 -vvvv --requirements --allow-disabled vmware_guest_network
38 ```
39
40
41 ## More Information
42
43 * [Developer guide for testing](https://docs.ansible.com/ansible/latest/collections/community/vmware/docsite/dev_guide.html#testing-with-your-own-infrastructure)