Fix connection type in junos integration tests (#34583)

* Fix connection type in junos integration tests

*  For find module in junos integration test
   add connection type local and delegate task to localhost

* Fix review comment
pull/26922/merge
Ganesh Nalawade 7 years ago committed by GitHub
parent dc85176512
commit 458cc38992
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -2,6 +2,7 @@
find:
paths: "{{ role_path }}/tests/netconf"
patterns: "{{ testcase }}.yaml"
connection: local
register: test_cases
- name: set test_items

@ -3,6 +3,7 @@
find:
paths: "{{ role_path }}/tests/netconf_json"
patterns: "{{ testcase }}.yaml"
connection: local
register: test_cases
- name: set test_items

@ -3,6 +3,7 @@
find:
paths: "{{ role_path }}/tests/netconf_text"
patterns: "{{ testcase }}.yaml"
connection: local
register: test_cases
- name: set test_items

@ -3,6 +3,7 @@
find:
paths: "{{ role_path }}/tests/netconf_xml"
patterns: "{{ testcase }}.yaml"
connection: local
register: test_cases
- name: set test_items

@ -3,6 +3,7 @@
find:
paths: "{{ role_path }}/tests/netconf"
patterns: "{{ testcase }}.yaml"
connection: local
register: test_cases
- name: set test_items

@ -13,12 +13,13 @@
paths: "{{ role_path }}/backup"
pattern: "{{ inventory_hostname_short }}_config*"
register: backup_files
delegate_to: localhost
connection: local
- name: delete backup files
file:
path: "{{ item.path }}"
state: absent
connection: local
with_items: "{{backup_files.files|default([])}}"
- name: configure device with config
@ -38,7 +39,7 @@
paths: "{{ role_path }}/backup"
pattern: "{{ inventory_hostname_short }}_config*"
register: backup_files
delegate_to: localhost
connection: local
- assert:
that:

@ -2,6 +2,7 @@
find:
paths: "{{ role_path }}/tests/netconf"
patterns: "{{ testcase }}.yaml"
connection: local
register: test_cases
- name: set test_items

@ -3,8 +3,8 @@
find:
paths: "{{ role_path }}/tests/netconf"
patterns: "{{ testcase }}.yaml"
connection: local
register: test_cases
delegate_to: localhost
- name: set test_items
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"

@ -3,8 +3,8 @@
find:
paths: "{{ role_path }}/tests/netconf"
patterns: "{{ testcase }}.yaml"
connection: local
register: test_cases
delegate_to: localhost
- name: set test_items
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"

@ -4,7 +4,7 @@
paths: "{{ role_path }}/tests/netconf"
patterns: "{{ testcase }}.yaml"
register: test_cases
delegate_to: localhost
connection: local
- name: set test_items
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"

@ -4,7 +4,7 @@
paths: "{{ role_path }}/tests/netconf"
patterns: "{{ testcase }}.yaml"
register: test_cases
delegate_to: localhost
connection: local
- name: set test_items
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"

@ -4,7 +4,7 @@
paths: "{{ role_path }}/tests/netconf"
patterns: "{{ testcase }}.yaml"
register: test_cases
delegate_to: localhost
connection: local
- name: set test_items
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"

@ -4,7 +4,7 @@
paths: "{{ role_path }}/tests/netconf"
patterns: "{{ testcase }}.yaml"
register: test_cases
delegate_to: localhost
connection: local
- name: set test_items
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"

@ -4,6 +4,7 @@
paths: "{{ role_path }}/tests/cli"
patterns: "{{ testcase }}.yaml"
register: test_cases
connection: local
- name: set test_items
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"

@ -3,6 +3,7 @@
paths: "{{ role_path }}/tests/netconf"
patterns: "{{ testcase }}.yaml"
register: test_cases
connection: local
- name: set test_items
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"

@ -4,7 +4,7 @@
paths: "{{ role_path }}/tests/netconf"
patterns: "{{ testcase }}.yaml"
register: test_cases
delegate_to: localhost
connection: local
- name: set test_items
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"

@ -4,7 +4,7 @@
paths: "{{ role_path }}/tests/netconf"
patterns: "{{ testcase }}.yaml"
register: test_cases
delegate_to: localhost
connection: local
- name: set test_items
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"

@ -4,6 +4,7 @@
paths: "{{ role_path }}/tests/netconf"
patterns: "{{ testcase }}.yaml"
register: test_cases
connection: local
- name: set test_items
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"

@ -3,6 +3,7 @@
paths: "{{ role_path }}/tests/netconf"
patterns: "{{ testcase }}.yaml"
register: test_cases
connection: local
- name: set test_items
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"

@ -3,6 +3,7 @@
paths: "{{ role_path }}/tests/netconf"
patterns: "{{ testcase }}.yaml"
register: test_cases
connection: local
- name: set test_items
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"

Loading…
Cancel
Save