Debian Codegraph @

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

raw symbols SCIP
1 # microsoft.ad.domain_child 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 snapshot do the following:
15
16 ```bash
17 virsh snapshot-create-as --domain "domain_child_PARENT" --name "pretest"
18 virsh snapshot-create-as --domain "domain_child_CHILD" --name "pretest"
19 virsh snapshot-create-as --domain "domain_child_TREE" --name "pretest"
20 ```
21
22 To restore these snapshots run the following:
23
24 ```bash
25 virsh snapshot-revert --domain "domain_child_PARENT" --snapshotname "pretest" --running
26 virsh snapshot-revert --domain "domain_child_CHILD" --snapshotname "pretest" --running
27 virsh snapshot-revert --domain "domain_child_TREE" --snapshotname "pretest" --running
28 ```
29
30 Once you are ready to run the tests run the following:
31
32 ```bash
33 ansible-playbook test.yml
34 ```
35
36 Run `vagrant destroy` to remove the test VMs.