Skip to content

Commit

Permalink
updated test playbooks
Browse files Browse the repository at this point in the history
  • Loading branch information
chidanandpujar committed Nov 3, 2022
1 parent e1a0523 commit b3a3490
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tests/junos_jsnapy/test_junos_storage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ tests_include:
check_storage:
- command: show system storage
- iterate:
xpath: //system-storage-information/filesystem[normalize-space(mounted-on)='/']
xpath: //system-storage-information/filesystem[normalize-space(mounted-on)='/.mount']
tests:
- is-lt: used-percent, 95
info: "File system {{post['mounted-on']}} use less than 95%"
Expand Down
8 changes: 8 additions & 0 deletions tests/pb.juniper_junos_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,14 @@
# path: out
# state: absent
################
- name: Append .foo to the hostname using private config mode.
config:
config_mode: 'private'
load: 'merge'
lines:
- "set system services netconf ssh"
comment: "Configured system services"

- name: Retrieve [edit system services] of current committed config.
config:
retrieve: 'committed'
Expand Down
6 changes: 4 additions & 2 deletions tests/pb.juniper_junos_jsnapy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,10 @@
ignore_errors: True
tags: [ test7 ]

- name: Wait for loopback to come up
pause: seconds=15
- name: Sleep for 15 seconds for loopback to come up
ansible.builtin.wait_for:
timeout: 15
delegate_to: localhost

- name: "TEST 7 - SNAP_POST with additional loopback"
jsnapy:
Expand Down
4 changes: 2 additions & 2 deletions tests/pb.juniper_junos_software.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
- name: Check TEST - 1
assert:
that:
- test1.failed == "false"
- test1.failed == false

handlers:
- name: wait_reboot
wait_for: host={{ ansible_ssh_host }} port=830 timeout={{ wait_time }}
when: not test.check_mode
when: not test1.check_mode
4 changes: 4 additions & 0 deletions tests/pb.juniper_junos_system.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,7 @@
that:
- test1.reboot == true
tags: [ test1 ]

- name: Checking NETCONF connectivity
wait_for: host={{ ansible_ssh_host }} port=830 timeout=360

0 comments on commit b3a3490

Please sign in to comment.