diff options
| author | omnom62 <75066712+omnom62@users.noreply.github.com> | 2025-05-23 17:15:01 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-23 17:15:01 +1000 |
| commit | 06bee69e0561f681a69037ce7aebe21dca25959b (patch) | |
| tree | ee27928e2e3196efe98dd0a05cda84bc35d32cf6 /tests/integration | |
| parent | 2879b9a4193aa3153f05b985e1f12d78cfbe6fd0 (diff) | |
| download | vyos.vyos-06bee69e0561f681a69037ce7aebe21dca25959b.tar.gz vyos.vyos-06bee69e0561f681a69037ce7aebe21dca25959b.zip | |
T7391 domain search fix for 1.4+ (#418)
* t7391 init
* sanity
* vyos_system unit test
* added vyos_system v14 test cases
* vyos_system integration tests fix
* changelog
* domain search integration test
* Update plugins/modules/vyos_system.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Diffstat (limited to 'tests/integration')
3 files changed, 51 insertions, 0 deletions
diff --git a/tests/integration/targets/vyos_system/tests/cli/domain_search.yaml b/tests/integration/targets/vyos_system/tests/cli/domain_search.yaml new file mode 100644 index 00000000..2422d2c7 --- /dev/null +++ b/tests/integration/targets/vyos_system/tests/cli/domain_search.yaml @@ -0,0 +1,43 @@ +--- +- debug: msg="START cli/domain_search.yaml on connection={{ ansible_connection }}" + +- name: ensure facts + include_tasks: _get_version.yaml + +- name: setup + ignore_errors: true + vyos.vyos.vyos_system: + domain_search: + - nbg.bufanda.ke + state: absent + +- name: configure domain search setting + register: result + vyos.vyos.vyos_system: + domain_search: + - nbg.bufanda.ke + +- assert: + that: + - result.changed == true + - result.commands|length == 1 + - "{{ merged['commands'] | symmetric_difference(result['commands']) |length == 0 }}" + +- name: configure domain search setting + register: result + vyos.vyos.vyos_system: + domain_search: + - nbg.bufanda.ke + +- assert: + that: + - result.changed == false + +- name: teardown + ignore_errors: true + vyos.vyos.vyos_system: + domain_search: + - nbg.bufanda.ke + state: absent + +- debug: msg="END cli/basic.yaml on connection={{ ansible_connection }}" diff --git a/tests/integration/targets/vyos_system/vars/pre-v1_4.yaml b/tests/integration/targets/vyos_system/vars/pre-v1_4.yaml new file mode 100644 index 00000000..cb41c9c6 --- /dev/null +++ b/tests/integration/targets/vyos_system/vars/pre-v1_4.yaml @@ -0,0 +1,4 @@ +--- +merged: + commands: + - set system domain-search domain 'nbg.bufanda.ke' diff --git a/tests/integration/targets/vyos_system/vars/v1_4.yaml b/tests/integration/targets/vyos_system/vars/v1_4.yaml new file mode 100644 index 00000000..96f0b7c9 --- /dev/null +++ b/tests/integration/targets/vyos_system/vars/v1_4.yaml @@ -0,0 +1,4 @@ +--- +merged: + commands: + - set system domain-search 'nbg.bufanda.ke' |
