diff options
author | omnom62 <75066712+omnom62@users.noreply.github.com> | 2025-01-27 22:02:17 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-27 12:02:17 +0000 |
commit | f64dd509fc1f53a2e9b4296512f1ee5c46bb47e6 (patch) | |
tree | c8c36af1ea86a934832af0ba967e616e7878c1ab /tests/integration/targets/vyos_firewall_interfaces/tasks | |
parent | 0a0ab13f84e3930e203a412ae08c127b282ab675 (diff) | |
download | vyos.vyos-f64dd509fc1f53a2e9b4296512f1ee5c46bb47e6.tar.gz vyos.vyos-f64dd509fc1f53a2e9b4296512f1ee5c46bb47e6.zip |
T7003 - firewall_interfaces integration tests refactor (#373)
* init T7003 - firewall_interfaces integration tests refactor
* v.1.3 fixed
* linter fixes
* v.14 fw_interfaces changes init
* v1.4 integration tests for firewall_interfaces
* v1.3. integration tests for firewall_interfaces (T7003)
* Isolating fw_int integration tests to 1.3- only
* linter fix
Diffstat (limited to 'tests/integration/targets/vyos_firewall_interfaces/tasks')
-rw-r--r-- | tests/integration/targets/vyos_firewall_interfaces/tasks/cli.yaml | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/integration/targets/vyos_firewall_interfaces/tasks/cli.yaml b/tests/integration/targets/vyos_firewall_interfaces/tasks/cli.yaml index daccf72..aaac7c9 100644 --- a/tests/integration/targets/vyos_firewall_interfaces/tasks/cli.yaml +++ b/tests/integration/targets/vyos_firewall_interfaces/tasks/cli.yaml @@ -1,4 +1,25 @@ --- +- name: Make sure to get facts + vyos.vyos.vyos_facts: + vars: + ansible_connection: ansible.netcommon.network_cli + register: vyos_facts + when: vyos_version is not defined + +- name: Debug vyos_facts + ansible.builtin.debug: + var: vyos_facts + +- name: Pull version from facts + ansible.builtin.set_fact: + vyos_version: "{{ vyos_facts.ansible_facts.ansible_net_version.split('-')[0].split(' ')[-1] }}" + when: vyos_version is not defined + +- name: Fix '.0' versions + ansible.builtin.set_fact: + vyos_version: "{{ vyos_version }}.0" + when: vyos_version.count('.') == 1 + - name: Collect all cli test cases ansible.builtin.find: paths: "{{ role_path }}/tests/cli" @@ -18,3 +39,4 @@ with_items: "{{ test_items }}" loop_control: loop_var: test_case_to_run + when: vyos_version is version('1.4.0', '<', version_type='semver') |