From d3ecf3efb7022fccd1cdca4f2947731a42dfaa18 Mon Sep 17 00:00:00 2001
From: Ricardo Carrillo Cruz <ricardo.carrillo.cruz@gmail.com>
Date: Thu, 17 Aug 2017 22:10:05 +0200
Subject: [PATCH] Remove user auth tests (#28364)

They are breaking CI, as they are SSHing with a non IP address.
Removing for now, we can think of other strategies for this later.
---
 .../targets/eos_user/tests/cli/auth.yaml      | 39 -------------------
 .../targets/ios_user/tests/cli/auth.yaml      | 39 -------------------
 .../targets/iosxr_user/tests/cli/auth.yaml    | 35 -----------------
 .../targets/nxos_user/tests/cli/auth.yaml     | 36 -----------------
 .../targets/nxos_user/tests/nxapi/auth.yaml   | 36 -----------------
 .../targets/vyos_user/tests/cli/auth.yaml     | 36 -----------------
 6 files changed, 221 deletions(-)
 delete mode 100644 test/integration/targets/eos_user/tests/cli/auth.yaml
 delete mode 100644 test/integration/targets/ios_user/tests/cli/auth.yaml
 delete mode 100644 test/integration/targets/iosxr_user/tests/cli/auth.yaml
 delete mode 100644 test/integration/targets/nxos_user/tests/cli/auth.yaml
 delete mode 100644 test/integration/targets/nxos_user/tests/nxapi/auth.yaml
 delete mode 100644 test/integration/targets/vyos_user/tests/cli/auth.yaml

diff --git a/test/integration/targets/eos_user/tests/cli/auth.yaml b/test/integration/targets/eos_user/tests/cli/auth.yaml
deleted file mode 100644
index 5d1eef108a6..00000000000
--- a/test/integration/targets/eos_user/tests/cli/auth.yaml
+++ /dev/null
@@ -1,39 +0,0 @@
----
-- block:
-  - name: Create user with password
-    eos_user:
-      name: auth_user
-      privilege: 15
-      role: network-operator
-      state: present
-      authorize: yes
-      provider: "{{ cli }}"
-      configured_password: pass123
-
-  - name: test login
-    expect:
-      command: "ssh auth_user@{{ inventory_hostname }} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no show version"
-      responses:
-        (?i)password: "pass123"
-
-  - name: test login with invalid password (should fail)
-    expect:
-      command: "ssh auth_user@{{ inventory_hostname }} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no show version"
-      responses:
-        (?i)password: "badpass"
-    ignore_errors: yes
-    register: results
-
-  - name: check that attempt failed
-    assert:
-      that:
-        - results.failed
-
-  always:
-  - name: delete user
-    eos_user:
-      name: auth_user
-      state: absent
-      provider: "{{ cli }}"
-      authorize: yes
-    register: result
diff --git a/test/integration/targets/ios_user/tests/cli/auth.yaml b/test/integration/targets/ios_user/tests/cli/auth.yaml
deleted file mode 100644
index d0d4f02bc2b..00000000000
--- a/test/integration/targets/ios_user/tests/cli/auth.yaml
+++ /dev/null
@@ -1,39 +0,0 @@
----
-- block:
-  - name: Create user with password
-    ios_user:
-      name: auth_user
-      privilege: 15
-      role: network-operator
-      state: present
-      authorize: yes
-      provider: "{{ cli }}"
-      configured_password: pass123
-
-  - name: test login
-    expect:
-      command: "ssh auth_user@{{ inventory_hostname }} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no show version"
-      responses:
-        (?i)password: "pass123"
-
-  - name: test login with invalid password (should fail)
-    expect:
-      command: "ssh auth_user@{{ inventory_hostname }} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no show version"
-      responses:
-        (?i)password: "badpass"
-    ignore_errors: yes
-    register: results
-
-  - name: check that attempt failed
-    assert:
-      that:
-        - results.failed
-
-  always:
-  - name: delete user
-    ios_user:
-      name: auth_user
-      state: absent
-      provider: "{{ cli }}"
-      authorize: yes
-    register: result
diff --git a/test/integration/targets/iosxr_user/tests/cli/auth.yaml b/test/integration/targets/iosxr_user/tests/cli/auth.yaml
deleted file mode 100644
index 0e9ccb6a353..00000000000
--- a/test/integration/targets/iosxr_user/tests/cli/auth.yaml
+++ /dev/null
@@ -1,35 +0,0 @@
----
-- block:
-  - name: Create user with password
-    iosxr_user:
-      name: auth_user
-      state: present
-      provider: "{{ cli }}"
-      configured_password: pass123
-
-  - name: test login
-    expect:
-      command: "ssh auth_user@{{ inventory_hostname }} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no show version"
-      responses:
-        (?i)password: "pass123"
-
-  - name: test login with invalid password (should fail)
-    expect:
-      command: "ssh auth_user@{{ inventory_hostname }} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no show version"
-      responses:
-        (?i)password: "badpass"
-    ignore_errors: yes
-    register: results
-
-  - name: check that attempt failed
-    assert:
-      that:
-        - results.failed
-
-  always:
-  - name: delete user
-    iosxr_user:
-      name: auth_user
-      state: absent
-      provider: "{{ cli }}"
-    register: result
diff --git a/test/integration/targets/nxos_user/tests/cli/auth.yaml b/test/integration/targets/nxos_user/tests/cli/auth.yaml
deleted file mode 100644
index 75f92a820e5..00000000000
--- a/test/integration/targets/nxos_user/tests/cli/auth.yaml
+++ /dev/null
@@ -1,36 +0,0 @@
----
-- block:
-  - name: Create user with password
-    nxos_user:
-      name: auth_user
-      role: network-operator
-      state: present
-      provider: "{{ cli }}"
-      configured_password: pass123
-
-  - name: test login
-    expect:
-      command: "ssh auth_user@{{ inventory_hostname }} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no show version"
-      responses:
-        (?i)password: "pass123"
-
-  - name: test login with invalid password (should fail)
-    expect:
-      command: "ssh auth_user@{{ inventory_hostname }} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no show version"
-      responses:
-        (?i)password: "badpass"
-    ignore_errors: yes
-    register: results
-
-  - name: check that attempt failed
-    assert:
-      that:
-        - results.failed
-
-  always:
-  - name: delete user
-    nxos_user:
-      name: auth_user
-      state: absent
-      provider: "{{ cli }}"
-    register: result
diff --git a/test/integration/targets/nxos_user/tests/nxapi/auth.yaml b/test/integration/targets/nxos_user/tests/nxapi/auth.yaml
deleted file mode 100644
index db0275d31db..00000000000
--- a/test/integration/targets/nxos_user/tests/nxapi/auth.yaml
+++ /dev/null
@@ -1,36 +0,0 @@
----
-- block:
-  - name: Create user with password
-    nxos_user:
-      name: auth_user
-      role: network-operator
-      state: present
-      provider: "{{ nxapi }}"
-      configured_password: pass123
-
-  - name: test login
-    expect:
-      command: "ssh auth_user@{{ inventory_hostname }} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no show version"
-      responses:
-        (?i)password: "pass123"
-
-  - name: test login with invalid password (shoul fail)
-    expect:
-      command: "ssh auth_user@{{ inventory_hostname }} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no show version"
-      responses:
-        (?i)password: "badpass"
-    ignore_errors: yes
-    register: results
-
-  - name: check that attempt failed
-    assert:
-      that:
-        - results.failed
-
-  always:
-  - name: delete user
-    nxos_user:
-      name: auth_user
-      state: absent
-      provider: "{{ nxapi }}"
-    register: result
diff --git a/test/integration/targets/vyos_user/tests/cli/auth.yaml b/test/integration/targets/vyos_user/tests/cli/auth.yaml
deleted file mode 100644
index 8c264f5b6fa..00000000000
--- a/test/integration/targets/vyos_user/tests/cli/auth.yaml
+++ /dev/null
@@ -1,36 +0,0 @@
----
-- block:
-  - name: Create user with password
-    vyos_user:
-      name: auth_user
-      role: admin
-      state: present
-      provider: "{{ cli }}"
-      configured_password: pass123
-
-  - name: test login
-    expect:
-      command: "ssh auth_user@{{ inventory_hostname }} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no '/opt/vyatta/sbin/vyatta-cfg-cmd-wrapper show version'"
-      responses:
-        (?i)password: "pass123"
-
-  - name: test login with invalid password (should fail)
-    expect:
-      command: "ssh auth_user@{{ inventory_hostname }} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no '/opt/vyatta/sbin/vyatta-cfg-cmd-wrapper show version'"
-      responses:
-        (?i)password: "badpass"
-    ignore_errors: yes
-    register: results
-
-  - name: check that attempt failed
-    assert:
-      that:
-        - results.failed
-
-  always:
-  - name: delete user
-    vyos_user:
-      name: auth_user
-      state: absent
-      provider: "{{ cli }}"
-    register: result