Skip to content

Commit 97c2ff7

Browse files
Small fixes in testing playbooks
- Changed playbooks directing to 'docker' as host to 'all'. - Updated of README.md for testing.
1 parent f678b57 commit 97c2ff7

4 files changed

Lines changed: 12 additions & 7 deletions

File tree

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -148,13 +148,13 @@ The sample playbook [`ibmmq.yml`](ansible_collections/ibm/ibmmq/ibmmq.yml) insta
148148
- On Mac:
149149

150150
```shell
151-
export ANSIBLE_LIBRARY=${ANSIBLE_LIBRARY}:<PATH-TO>/ansible_mq/ansible_collections/ibm/ibmmq/library
151+
export ANSIBLE_LIBRARY=${ANSIBLE_LIBRARY}:<PATH-TO>/mq-ansible/ansible_collections/ibm/ibmmq/library
152152
```
153153

154154
- On Windows:
155155

156156
```shell
157-
set ANSIBLE_LIBRARY=%ANSIBLE_LIBRARY%;<PATH-TO>/ansible_mq/ansible_collections/ibm/ibmmq/library
157+
set ANSIBLE_LIBRARY=%ANSIBLE_LIBRARY%;<PATH-TO>/mq-ansible/ansible_collections/ibm/ibmmq/library
158158
```
159159

160160
2. Run the following command to execute the tasks within the playbook:
@@ -201,16 +201,20 @@ These playbooks test the functionality and performance of our roles and the queu
201201

202202
To run the test playbooks first:
203203

204-
1. make sure you are in the right directory
204+
1. copy your `inventory.ini` file to the `tests/playbooks` directory
205+
```shell
206+
cp invenotry.ini tests/playbooks
207+
```
208+
2. go to the `tests/playbooks` directory
205209
```shell
206210
cd tests/playbooks
207211
```
208-
2. export the modules to your Ansible library
212+
3. export the modules to your Ansible library
209213
```shell
210214
export ANSIBLE_LIBRARY=${ANSIBLE_LIBRARY}:<PATH-TO>/ansible_mq/ansible_collections/ibm/ibmmq/library
211215
```
212216
- ##### *Note*: change `<PATH-TO>` to your local directory path:
213-
3. run all test playbooks with `python3 main.py`
217+
4. run all test playbooks with `python3 main.py`
214218

215219
## License
216220

ansible_collections/ibm/ibmmq/tests/playbooks/main.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
import subprocess
66
subprocess.run(['ansible-playbook', '--inventory', 'inventory.ini', 'test_install.yml'])
7+
subprocess.run(['ansible-playbook', '--inventory', 'inventory.ini', 'setup_test.yml'])
78
subprocess.run(['ansible-playbook', '--inventory', 'inventory.ini', 'test_absent_qmgr.yml'])
89
subprocess.run(['ansible-playbook', '--inventory', 'inventory.ini', 'test_present_qmgr.yml'])
910
subprocess.run(['ansible-playbook', '--inventory', 'inventory.ini', 'test_running_qmgr.yml'])

ansible_collections/ibm/ibmmq/tests/playbooks/test_install.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
- name: test downloading and installing MQ
2-
hosts: docker
2+
hosts: all
33
become: true
44
environment:
55
PATH: /opt/mqm/bin:{{ ansible_env.PATH }}

ansible_collections/ibm/ibmmq/tests/playbooks/test_web_console.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
- name: test downloading and installing MQ
2-
hosts: docker
2+
hosts: all
33
become: false
44
environment:
55
PATH: /opt/mqm/bin:{{ ansible_env.PATH }}

0 commit comments

Comments
 (0)