diff options
Diffstat (limited to 'test/integration/targets/eos_config/tests/cli/check_mode.yaml')
-rw-r--r-- | test/integration/targets/eos_config/tests/cli/check_mode.yaml | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/test/integration/targets/eos_config/tests/cli/check_mode.yaml b/test/integration/targets/eos_config/tests/cli/check_mode.yaml index 424b8bd15e..3961239547 100644 --- a/test/integration/targets/eos_config/tests/cli/check_mode.yaml +++ b/test/integration/targets/eos_config/tests/cli/check_mode.yaml @@ -1,5 +1,6 @@ --- -- debug: msg="START cli/check_mode.yaml on connection={{ ansible_connection }}" +- debug: + msg: "START cli/check_mode.yaml on connection={{ ansible_connection }}" - name: invalid configuration in check mode eos_config: @@ -39,11 +40,28 @@ that: - "config.session not in result.stdout[0].sessions" +- name: configuration in check mode + no config session + eos_config: + lines: + - ip address 119.31.1.1 255.255.255.254 + parents: interface Loopback911 + become: yes + check_mode: 1 + vars: + ansible_eos_use_sessions: 0 + register: result + ignore_errors: yes + +- assert: + that: + - "result.failed == true" + - name: invalid configuration in check mode + no config session eos_config: lines: - ip address 119.31.1.1 255.255.255.256 parents: interface Loopback911 + diff_against: running become: yes check_mode: 1 vars: @@ -60,6 +78,7 @@ lines: - ip address 119.31.1.1 255.255.255.255 parents: interface Loopback911 + diff_against: running become: yes check_mode: yes register: result |