Skip to content
Permalink
Browse files

ios_bgp: add integration tests

  • Loading branch information...
hexdump0x0200 committed Jun 14, 2019
1 parent 32e6296 commit 94c4b8c52c71d8d008b3cb05ea213861a1410228
Showing with 56 additions and 0 deletions.
  1. +56 −0 test/integration/targets/ios_bgp/tests/cli/basic.yaml
@@ -5,6 +5,62 @@
operation: delete
ignore_errors: yes

- name: Add fake config with 'bgp' string
ios_config:
match: none
replace: block
lines:
- "no ip access-list extended BGP_ACL"
- "ip access-list extended BGP_ACL"
- "permit tcp any any eq bgp"

- name: Try delete fake bgp config
register: result
ios_bgp:
operation: delete

- assert:
that:
- 'result.changed == false'

- name: Clean fake config with 'bgp' string
ios_config:
match: none
replace: block
lines:
- "no ip access-list extended BGP_ACL"

- name: Add fake bgp-like config
ios_config:
match: none
replace: block
lines:
- "no ip access-list extended BGP_ACL_2"
- "ip access-list extended BGP_ACL_2"
- "remark router bgp 64496"
- "remark neighbor 192.0.2.10 remote-as 64496"
- "remark neighbor 192.0.2.10 shutdown"
- "remark address-family ipv4"
- "remark neighbor 192.0.2.10 activate"
- "remark exit-address-family"
- "permit tcp any any eq bgp"

- name: Try delete fake bgp-like config
register: result
ios_bgp:
operation: delete

- assert:
that:
- 'result.changed == false'

- name: Clean fake bgp-like config
ios_config:
match: none
replace: block
lines:
- "no ip access-list extended BGP_ACL_2"

- name: Configure BGP with AS 64496 and a router-id
ios_bgp: &config
operation: merge

0 comments on commit 94c4b8c

Please sign in to comment.
You can’t perform that action at this time.