diff options
Diffstat (limited to 'tests/integration/targets/vyos_hostname')
11 files changed, 11 insertions, 18 deletions
diff --git a/tests/integration/targets/vyos_hostname/defaults/main.yaml b/tests/integration/targets/vyos_hostname/defaults/main.yaml index 852a6be..164afea 100644 --- a/tests/integration/targets/vyos_hostname/defaults/main.yaml +++ b/tests/integration/targets/vyos_hostname/defaults/main.yaml @@ -1,3 +1,3 @@ --- -testcase: '[^_].*' +testcase: "[^_].*" test_items: [] diff --git a/tests/integration/targets/vyos_hostname/meta/main.yaml b/tests/integration/targets/vyos_hostname/meta/main.yaml index 91da2a7..ed97d53 100644 --- a/tests/integration/targets/vyos_hostname/meta/main.yaml +++ b/tests/integration/targets/vyos_hostname/meta/main.yaml @@ -1,2 +1 @@ --- -... diff --git a/tests/integration/targets/vyos_hostname/tasks/cli.yaml b/tests/integration/targets/vyos_hostname/tasks/cli.yaml index 93eb2fe..83496e0 100644 --- a/tests/integration/targets/vyos_hostname/tasks/cli.yaml +++ b/tests/integration/targets/vyos_hostname/tasks/cli.yaml @@ -1,8 +1,8 @@ --- - name: Collect all cli test cases find: - paths: '{{ role_path }}/tests/cli' - patterns: '{{ testcase }}.yaml' + paths: "{{ role_path }}/tests/cli" + patterns: "{{ testcase }}.yaml" use_regex: true register: test_cases delegate_to: localhost @@ -11,9 +11,9 @@ set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" - name: Run test case (connection=ansible.netcommon.network_cli) - include: '{{ test_case_to_run }}' + include: "{{ test_case_to_run }}" vars: ansible_connection: ansible.netcommon.network_cli - with_items: '{{ test_items }}' + with_items: "{{ test_items }}" loop_control: loop_var: test_case_to_run diff --git a/tests/integration/targets/vyos_hostname/tests/cli/deleted.yaml b/tests/integration/targets/vyos_hostname/tests/cli/deleted.yaml index 5f9df51..2c052f4 100644 --- a/tests/integration/targets/vyos_hostname/tests/cli/deleted.yaml +++ b/tests/integration/targets/vyos_hostname/tests/cli/deleted.yaml @@ -7,7 +7,6 @@ - include_tasks: _populate_config.yaml - block: - - name: Delete the provided configuration register: result vyos.vyos.vyos_hostname: &id001 @@ -25,7 +24,8 @@ that: - result.after == {} - - name: Delete the existing configuration with the provided running configuration + - name: + Delete the existing configuration with the provided running configuration (IDEMPOTENT) register: result vyos.vyos.vyos_hostname: *id001 @@ -36,5 +36,4 @@ - result['changed'] == false always: - - include_tasks: _remove_config.yaml diff --git a/tests/integration/targets/vyos_hostname/tests/cli/gathered.yaml b/tests/integration/targets/vyos_hostname/tests/cli/gathered.yaml index 0509fc5..f3eacad 100644 --- a/tests/integration/targets/vyos_hostname/tests/cli/gathered.yaml +++ b/tests/integration/targets/vyos_hostname/tests/cli/gathered.yaml @@ -8,7 +8,6 @@ - include_tasks: _populate_config.yaml - block: - - name: Gather config from the device in structured format. register: result vyos.vyos.vyos_hostname: @@ -24,5 +23,4 @@ - result.gathered == ansible_facts['network_resources']['hostname'] always: - - include_tasks: _remove_config.yaml diff --git a/tests/integration/targets/vyos_hostname/tests/cli/merged.yaml b/tests/integration/targets/vyos_hostname/tests/cli/merged.yaml index f9b28c7..14ed1df 100644 --- a/tests/integration/targets/vyos_hostname/tests/cli/merged.yaml +++ b/tests/integration/targets/vyos_hostname/tests/cli/merged.yaml @@ -24,7 +24,6 @@ - result.after == ansible_facts['network_resources']['hostname'] - result.after == merged.after - - name: Assert that before dicts were correctly generated assert: that: diff --git a/tests/integration/targets/vyos_hostname/tests/cli/overridden.yaml b/tests/integration/targets/vyos_hostname/tests/cli/overridden.yaml index d9fd76d..a50ef64 100644 --- a/tests/integration/targets/vyos_hostname/tests/cli/overridden.yaml +++ b/tests/integration/targets/vyos_hostname/tests/cli/overridden.yaml @@ -26,7 +26,6 @@ - result.after == ansible_facts['network_resources']['hostname'] - result.after == merged.after - - name: override the provided configuration with the existing running configuration (IDEMPOTENT) diff --git a/tests/integration/targets/vyos_hostname/tests/cli/parsed.yaml b/tests/integration/targets/vyos_hostname/tests/cli/parsed.yaml index f6c00bb..b1aa806 100644 --- a/tests/integration/targets/vyos_hostname/tests/cli/parsed.yaml +++ b/tests/integration/targets/vyos_hostname/tests/cli/parsed.yaml @@ -1,6 +1,7 @@ --- - debug: - msg: START vyos_hostname parsed integration tests on connection={{ ansible_connection + msg: + START vyos_hostname parsed integration tests on connection={{ ansible_connection }} - name: Provide the running configuration for parsing (config to be parsed) @@ -9,7 +10,6 @@ running_config: "{{ lookup('file', '_parsed.cfg') }}" state: parsed - - name: Assert that config was correctly parsed assert: that: diff --git a/tests/integration/targets/vyos_hostname/tests/cli/rendered.yaml b/tests/integration/targets/vyos_hostname/tests/cli/rendered.yaml index 28ec797..25c81b2 100644 --- a/tests/integration/targets/vyos_hostname/tests/cli/rendered.yaml +++ b/tests/integration/targets/vyos_hostname/tests/cli/rendered.yaml @@ -10,7 +10,7 @@ register: result vyos.vyos.vyos_hostname: config: - hostname: 'vyosTest' + hostname: "vyosTest" state: rendered - assert: diff --git a/tests/integration/targets/vyos_hostname/tests/cli/replaced.yaml b/tests/integration/targets/vyos_hostname/tests/cli/replaced.yaml index 6acb993..7d9b522 100644 --- a/tests/integration/targets/vyos_hostname/tests/cli/replaced.yaml +++ b/tests/integration/targets/vyos_hostname/tests/cli/replaced.yaml @@ -26,7 +26,6 @@ - result.after == ansible_facts['network_resources']['hostname'] - result.after == merged.after - - name: Replace the provided configuration with the existing running configuration (IDEMPOTENT) diff --git a/tests/integration/targets/vyos_hostname/vars/main.yaml b/tests/integration/targets/vyos_hostname/vars/main.yaml index 615da43..ca02d03 100644 --- a/tests/integration/targets/vyos_hostname/vars/main.yaml +++ b/tests/integration/targets/vyos_hostname/vars/main.yaml @@ -4,7 +4,7 @@ merged: commands: - set system host-name vyosTest after: - hostname: 'vyosTest' + hostname: "vyosTest" deleted: commands: |