summaryrefslogtreecommitdiff
path: root/tests/integration/targets/vyos_command
diff options
context:
space:
mode:
authorCaptTrews <capttrews@gmail.com>2019-12-04 00:26:13 +0000
committerCaptTrews <capttrews@gmail.com>2019-12-04 00:26:13 +0000
commitf4fff0b4a4ecd2e634f4dcb515bf92c20d3771ba (patch)
tree133958d96ff13a3df7bae53742d138ac9bfd2884 /tests/integration/targets/vyos_command
parentdf640eaacf60e82e6cf6f8b10236894eef1cc8ce (diff)
downloadvyos-ansible-old-f4fff0b4a4ecd2e634f4dcb515bf92c20d3771ba.tar.gz
vyos-ansible-old-f4fff0b4a4ecd2e634f4dcb515bf92c20d3771ba.zip
Updated from network content collector
Signed-off-by: CaptTrews <capttrews@gmail.com>
Diffstat (limited to 'tests/integration/targets/vyos_command')
-rw-r--r--tests/integration/targets/vyos_command/tasks/main.yaml2
-rw-r--r--tests/integration/targets/vyos_command/tests/cli/bad_operator.yaml2
-rw-r--r--tests/integration/targets/vyos_command/tests/cli/cli_command.yaml52
-rw-r--r--tests/integration/targets/vyos_command/tests/cli/invalid.yaml8
-rw-r--r--tests/integration/targets/vyos_command/tests/cli/output.yaml4
-rw-r--r--tests/integration/targets/vyos_command/tests/cli/timeout.yaml2
6 files changed, 35 insertions, 35 deletions
diff --git a/tests/integration/targets/vyos_command/tasks/main.yaml b/tests/integration/targets/vyos_command/tasks/main.yaml
index 415c99d..d4cf26f 100644
--- a/tests/integration/targets/vyos_command/tasks/main.yaml
+++ b/tests/integration/targets/vyos_command/tasks/main.yaml
@@ -1,2 +1,2 @@
---
-- { include: cli.yaml, tags: ['cli'] }
+- {include: cli.yaml, tags: ['cli']}
diff --git a/tests/integration/targets/vyos_command/tests/cli/bad_operator.yaml b/tests/integration/targets/vyos_command/tests/cli/bad_operator.yaml
index bf3334f..5ff72fa 100644
--- a/tests/integration/targets/vyos_command/tests/cli/bad_operator.yaml
+++ b/tests/integration/targets/vyos_command/tests/cli/bad_operator.yaml
@@ -9,7 +9,7 @@
wait_for:
- result[0] is 'VyOS'
register: result
- ignore_errors: yes
+ ignore_errors: true
- assert:
that:
diff --git a/tests/integration/targets/vyos_command/tests/cli/cli_command.yaml b/tests/integration/targets/vyos_command/tests/cli/cli_command.yaml
index 08a7675..a10f2bc 100644
--- a/tests/integration/targets/vyos_command/tests/cli/cli_command.yaml
+++ b/tests/integration/targets/vyos_command/tests/cli/cli_command.yaml
@@ -3,39 +3,39 @@
msg: "START cli/cli_command.yaml on connection={{ ansible_connection }}"
- block:
- - name: get output for single command
- network.cli.cli_command:
- command: show version
- register: result
+ - name: get output for single command
+ network.cli.cli_command:
+ command: show version
+ register: result
- - assert:
- that:
- - "result.changed == false"
- - "result.stdout is defined"
+ - assert:
+ that:
+ - "result.changed == false"
+ - "result.stdout is defined"
- - name: send invalid command
- network.cli.cli_command:
- command: 'show foo'
- register: result
- ignore_errors: yes
+ - name: send invalid command
+ network.cli.cli_command:
+ command: 'show foo'
+ register: result
+ ignore_errors: true
- - assert:
- that:
- - "result.failed == true"
- - "result.msg is defined"
+ - assert:
+ that:
+ - "result.failed == true"
+ - "result.msg is defined"
when: "ansible_connection == 'network_cli'"
- block:
- - name: test failure for local connection
- network.cli.cli_command:
- command: show version
- register: result
- ignore_errors: yes
+ - name: test failure for local connection
+ network.cli.cli_command:
+ command: show version
+ register: result
+ ignore_errors: true
- - assert:
- that:
- - 'result.failed == true'
- - "'Connection type local is not valid for this module' in result.msg"
+ - assert:
+ that:
+ - 'result.failed == true'
+ - "'Connection type local is not valid for this module' in result.msg"
when: "ansible_connection == 'local'"
- debug: msg="END cli/cli_command.yaml on connection={{ ansible_connection }}"
diff --git a/tests/integration/targets/vyos_command/tests/cli/invalid.yaml b/tests/integration/targets/vyos_command/tests/cli/invalid.yaml
index 672f6e8..04d203d 100644
--- a/tests/integration/targets/vyos_command/tests/cli/invalid.yaml
+++ b/tests/integration/targets/vyos_command/tests/cli/invalid.yaml
@@ -5,9 +5,9 @@
vyos.vyos.vyos_command:
commands: show foo
register: result
- ignore_errors: yes
+ ignore_errors: true
-- assert: { that: result.failed }
+- assert: {that: result.failed}
- name: run commands that include invalid command
vyos.vyos.vyos_command:
@@ -15,8 +15,8 @@
- show version
- show foo
register: result
- ignore_errors: yes
+ ignore_errors: true
-- assert: { that: result.failed }
+- assert: {that: result.failed}
- debug: msg="END cli/invalid.yaml on connection={{ ansible_connection }}"
diff --git a/tests/integration/targets/vyos_command/tests/cli/output.yaml b/tests/integration/targets/vyos_command/tests/cli/output.yaml
index bdc8b2a..1bc0dc6 100644
--- a/tests/integration/targets/vyos_command/tests/cli/output.yaml
+++ b/tests/integration/targets/vyos_command/tests/cli/output.yaml
@@ -28,8 +28,8 @@
- name: Get output for multiple commands that call less explicitly
vyos.vyos.vyos_command:
commands:
- # NOTE: We only test show commands that will output <ANSIBLE_VYOS_TERMINAL_LENGTH
- # Otherwise you will get ": "command timeout triggered"
+ # NOTE: We only test show commands that will output <ANSIBLE_VYOS_TERMINAL_LENGTH
+ # Otherwise you will get ": "command timeout triggered"
- show hardware cpu detail
- show hardware mem
- show license
diff --git a/tests/integration/targets/vyos_command/tests/cli/timeout.yaml b/tests/integration/targets/vyos_command/tests/cli/timeout.yaml
index e4716ed..57120ac 100644
--- a/tests/integration/targets/vyos_command/tests/cli/timeout.yaml
+++ b/tests/integration/targets/vyos_command/tests/cli/timeout.yaml
@@ -8,7 +8,7 @@
wait_for:
- result[0] contains bad_value_string
register: result
- ignore_errors: yes
+ ignore_errors: true
- assert:
that: