summaryrefslogtreecommitdiff
path: root/tests/integration/targets/vyos_user
diff options
context:
space:
mode:
authorKate Case <kcase@redhat.com>2023-01-25 08:37:58 -0500
committerGitHub <noreply@github.com>2023-01-25 08:37:58 -0500
commite9911888f6dcdf9031f3fdb2e32c52e45815fdbe (patch)
treedc22abb4a329ef04e98685b81d074679dc24c456 /tests/integration/targets/vyos_user
parentbcfe61a3b6ff69f08450f3dbd8f0f1827fb18ab3 (diff)
downloadvyos.vyos-e9911888f6dcdf9031f3fdb2e32c52e45815fdbe.tar.gz
vyos.vyos-e9911888f6dcdf9031f3fdb2e32c52e45815fdbe.zip
Add prettier and isort to pre-commit. (#270)
* Add prettier and isort to pre-commit. * Bump line-length to 100 * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Diffstat (limited to 'tests/integration/targets/vyos_user')
-rw-r--r--tests/integration/targets/vyos_user/defaults/main.yaml2
-rw-r--r--tests/integration/targets/vyos_user/tasks/cli.yaml8
-rw-r--r--tests/integration/targets/vyos_user/tests/cli/auth.yaml8
-rw-r--r--tests/integration/targets/vyos_user/tests/cli/basic.yaml3
4 files changed, 9 insertions, 12 deletions
diff --git a/tests/integration/targets/vyos_user/defaults/main.yaml b/tests/integration/targets/vyos_user/defaults/main.yaml
index a845c24b..9ef5ba51 100644
--- a/tests/integration/targets/vyos_user/defaults/main.yaml
+++ b/tests/integration/targets/vyos_user/defaults/main.yaml
@@ -1,3 +1,3 @@
---
-testcase: '*'
+testcase: "*"
test_items: []
diff --git a/tests/integration/targets/vyos_user/tasks/cli.yaml b/tests/integration/targets/vyos_user/tasks/cli.yaml
index 8f7b62f9..b2746ce7 100644
--- a/tests/integration/targets/vyos_user/tasks/cli.yaml
+++ b/tests/integration/targets/vyos_user/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"
register: test_cases
delegate_to: localhost
@@ -10,8 +10,8 @@
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 }} ansible_connection=ansible.netcommon.network_cli'
- with_items: '{{ test_items }}'
+ include: "{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli"
+ with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run
tags:
diff --git a/tests/integration/targets/vyos_user/tests/cli/auth.yaml b/tests/integration/targets/vyos_user/tests/cli/auth.yaml
index bc4e7880..87eaba60 100644
--- a/tests/integration/targets/vyos_user/tests/cli/auth.yaml
+++ b/tests/integration/targets/vyos_user/tests/cli/auth.yaml
@@ -1,6 +1,5 @@
---
- block:
-
- name: Create user with password
vyos.vyos.vyos_user:
name: auth_user
@@ -10,7 +9,8 @@
- name: test login via ssh with new user
expect:
- command: ssh auth_user@{{ ansible_ssh_host }} -p {{ ansible_port | default(22)
+ command:
+ ssh auth_user@{{ ansible_ssh_host }} -p {{ ansible_port | default(22)
}} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no '/opt/vyatta/sbin/vyatta-cfg-cmd-wrapper
show version'
responses:
@@ -18,7 +18,8 @@
- name: test login via ssh with invalid password (should fail)
expect:
- command: ssh auth_user@{{ ansible_ssh_host }} -p {{ ansible_port | default(22)
+ command:
+ ssh auth_user@{{ ansible_ssh_host }} -p {{ ansible_port | default(22)
}} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no '/opt/vyatta/sbin/vyatta-cfg-cmd-wrapper
show version'
responses:
@@ -31,7 +32,6 @@
that:
- results.failed
always:
-
- name: delete user
register: result
vyos.vyos.vyos_user:
diff --git a/tests/integration/targets/vyos_user/tests/cli/basic.yaml b/tests/integration/targets/vyos_user/tests/cli/basic.yaml
index 00a7a264..edd3b5c2 100644
--- a/tests/integration/targets/vyos_user/tests/cli/basic.yaml
+++ b/tests/integration/targets/vyos_user/tests/cli/basic.yaml
@@ -25,7 +25,6 @@
register: result
vyos.vyos.vyos_user:
aggregate:
-
- name: ansibletest2
- name: ansibletest3
@@ -55,7 +54,6 @@
register: result
vyos.vyos.vyos_user:
aggregate:
-
- name: ansibletest2
- name: ansibletest3
@@ -71,7 +69,6 @@
register: result
vyos.vyos.vyos_user:
users:
-
- name: ansibletest1
- name: ansibletest2