diff options
author | ansible-zuul[bot] <48994755+ansible-zuul[bot]@users.noreply.github.com> | 2019-10-01 03:40:49 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-01 03:40:49 +0000 |
commit | 2ba6494f42b547386ba61624770c16aecd2435e9 (patch) | |
tree | ec37ffdc027e6a0458346e198799e2bb35174f4b /tests | |
parent | 1c3031ec21cd14952fb3256600e3ab50fc28fd77 (diff) | |
parent | 50e9bfdb1a7eca7e343ff56440e244e405234d2e (diff) | |
download | vyos.vyos-2ba6494f42b547386ba61624770c16aecd2435e9.tar.gz vyos.vyos-2ba6494f42b547386ba61624770c16aecd2435e9.zip |
Merge pull request #39 from CaptTrews/ansible/collections-sync-master
Updated from network content collector
Reviewed-by: https://github.com/apps/ansible-zuul
Diffstat (limited to 'tests')
-rw-r--r-- | tests/integration/targets/vyos_interfaces/tests/cli/empty_config.yaml | 36 | ||||
-rw-r--r-- | tests/integration/targets/vyos_l3_interfaces/tests/cli/empty_config.yaml | 36 |
2 files changed, 72 insertions, 0 deletions
diff --git a/tests/integration/targets/vyos_interfaces/tests/cli/empty_config.yaml b/tests/integration/targets/vyos_interfaces/tests/cli/empty_config.yaml new file mode 100644 index 0000000..ab68fde --- /dev/null +++ b/tests/integration/targets/vyos_interfaces/tests/cli/empty_config.yaml @@ -0,0 +1,36 @@ +--- +- debug: + msg: "START vyos_interfaces empty_config integration tests on connection={{ ansible_connection }}" + +- name: Merged with empty config should give appropriate error message + vyos.vyos.vyos_interfaces: + config: + state: merged + register: result + ignore_errors: True + +- assert: + that: + - result.msg == 'value of config parameter must not be empty for state merged' + +- name: Replaced with empty config should give appropriate error message + vyos.vyos.vyos_interfaces: + config: + state: replaced + register: result + ignore_errors: True + +- assert: + that: + - result.msg == 'value of config parameter must not be empty for state replaced' + +- name: Overridden with empty config should give appropriate error message + vyos.vyos.vyos_interfaces: + config: + state: overridden + register: result + ignore_errors: True + +- assert: + that: + - result.msg == 'value of config parameter must not be empty for state overridden' diff --git a/tests/integration/targets/vyos_l3_interfaces/tests/cli/empty_config.yaml b/tests/integration/targets/vyos_l3_interfaces/tests/cli/empty_config.yaml new file mode 100644 index 0000000..530df88 --- /dev/null +++ b/tests/integration/targets/vyos_l3_interfaces/tests/cli/empty_config.yaml @@ -0,0 +1,36 @@ +--- +- debug: + msg: "START vyos_l3_interfaces empty_config integration tests on connection={{ ansible_connection }}" + +- name: Merged with empty config should give appropriate error message + vyos.vyos.vyos_l3_interfaces: + config: + state: merged + register: result + ignore_errors: True + +- assert: + that: + - result.msg == 'value of config parameter must not be empty for state merged' + +- name: Replaced with empty config should give appropriate error message + vyos.vyos.vyos_l3_interfaces: + config: + state: replaced + register: result + ignore_errors: True + +- assert: + that: + - result.msg == 'value of config parameter must not be empty for state replaced' + +- name: Overridden with empty config should give appropriate error message + vyos.vyos.vyos_l3_interfaces: + config: + state: overridden + register: result + ignore_errors: True + +- assert: + that: + - result.msg == 'value of config parameter must not be empty for state overridden' |