Debian Codegraph @

ansible_collections/microsoft/ad/tests/integration/targets/domain_controller/README.md

raw
1 # microsoft.ad.domain_controller tests
2
3 As this cannot be run in CI this is a brief guide on how to run these tests locally.
4 Run the following:
5
6 ```bash
7 vagrant up
8
9 ansible-playbook setup.yml
10 ```
11
12 It is a good idea to create a snapshot of both hosts before running the tests.
13 This allows you to reset the host back to a blank starting state if the tests need to be rerun.
14 To create a snaphost do the following:
15
16 ```bash
17 virsh snapshot-create-as --domain "domain_controller_DC" --name "pretest"
18 virsh snapshot-create-as --domain "domain_controller_TEST" --name "pretest"
19 ```
20
21 To restore these snapshots run the following:
22
23 ```bash
24 virsh snapshot-revert --domain "domain_controller_DC" --snapshotname "pretest" --running
25 virsh snapshot-revert --domain "domain_controller_TEST" --snapshotname "pretest" --running
26 ```
27
28 Once you are ready to run the tests run the following:
29
30 ```bash
31 ansible-playbook test.yml
32 ```
33
34 Run `vagrant destroy` to remove the test VMs.