From 5dae6a6392bede6ab7cd0ee5a0f98ce06f3ab184 Mon Sep 17 00:00:00 2001 From: John R Barker Date: Thu, 31 Aug 2017 11:11:32 +0100 Subject: [PATCH] Delete targets/ops_command as module no longer exists (#28868) --- .../targets/ops_command/defaults/main.yaml | 3 -- .../targets/ops_command/tasks/cli.yaml | 15 ---------- .../targets/ops_command/tasks/main.yaml | 2 -- .../ops_command/tests/cli/bad_operator.yaml | 20 ------------- .../ops_command/tests/cli/contains.yaml | 20 ------------- .../ops_command/tests/cli/invalid.yaml | 28 ------------------ .../targets/ops_command/tests/cli/output.yaml | 29 ------------------- .../ops_command/tests/cli/timeout.yaml | 19 ------------ 8 files changed, 136 deletions(-) delete mode 100644 test/integration/targets/ops_command/defaults/main.yaml delete mode 100644 test/integration/targets/ops_command/tasks/cli.yaml delete mode 100644 test/integration/targets/ops_command/tasks/main.yaml delete mode 100644 test/integration/targets/ops_command/tests/cli/bad_operator.yaml delete mode 100644 test/integration/targets/ops_command/tests/cli/contains.yaml delete mode 100644 test/integration/targets/ops_command/tests/cli/invalid.yaml delete mode 100644 test/integration/targets/ops_command/tests/cli/output.yaml delete mode 100644 test/integration/targets/ops_command/tests/cli/timeout.yaml diff --git a/test/integration/targets/ops_command/defaults/main.yaml b/test/integration/targets/ops_command/defaults/main.yaml deleted file mode 100644 index 822f2213a44..00000000000 --- a/test/integration/targets/ops_command/defaults/main.yaml +++ /dev/null @@ -1,3 +0,0 @@ ---- -testcase: "*" -test_cases: [] diff --git a/test/integration/targets/ops_command/tasks/cli.yaml b/test/integration/targets/ops_command/tasks/cli.yaml deleted file mode 100644 index d675462dd02..00000000000 --- a/test/integration/targets/ops_command/tasks/cli.yaml +++ /dev/null @@ -1,15 +0,0 @@ ---- -- name: collect all cli test cases - find: - paths: "{{ role_path }}/tests/cli" - patterns: "{{ testcase }}.yaml" - register: test_cases - -- name: set test_items - set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" - -- name: run test case - include: "{{ test_case_to_run }}" - with_items: "{{ test_items }}" - loop_control: - loop_var: test_case_to_run diff --git a/test/integration/targets/ops_command/tasks/main.yaml b/test/integration/targets/ops_command/tasks/main.yaml deleted file mode 100644 index 415c99d8b12..00000000000 --- a/test/integration/targets/ops_command/tasks/main.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -- { include: cli.yaml, tags: ['cli'] } diff --git a/test/integration/targets/ops_command/tests/cli/bad_operator.yaml b/test/integration/targets/ops_command/tests/cli/bad_operator.yaml deleted file mode 100644 index c3e48f0c6c7..00000000000 --- a/test/integration/targets/ops_command/tests/cli/bad_operator.yaml +++ /dev/null @@ -1,20 +0,0 @@ ---- -- debug: msg="START cli/bad_operator.yaml" - -- name: test bad operator - ops_command: - commands: - - show version - - show interfaces - wait_for: - - result[0] contains 'Description: Foo' - provider: "{{ cli }}" - register: result - ignore_errors: yes - -- assert: - that: - - "result.failed == true" - - "result.msg is defined" - -- debug: msg="END cli/bad_operator.yaml" diff --git a/test/integration/targets/ops_command/tests/cli/contains.yaml b/test/integration/targets/ops_command/tests/cli/contains.yaml deleted file mode 100644 index 72aa284ccf1..00000000000 --- a/test/integration/targets/ops_command/tests/cli/contains.yaml +++ /dev/null @@ -1,20 +0,0 @@ ---- -- debug: msg="START cli/contains.yaml" - -- name: test contains operator - ops_command: - commands: - - show version - - show interface eth1 - wait_for: - - "result[0] contains OpenSwitch" - - "result[1] contains 'Interface eth1'" - provider: "{{ cli }}" - register: result - -- assert: - that: - - "result.changed == false" - - "result.stdout is defined" - -- debug: msg="END cli/contains.yaml" diff --git a/test/integration/targets/ops_command/tests/cli/invalid.yaml b/test/integration/targets/ops_command/tests/cli/invalid.yaml deleted file mode 100644 index 7be4dd66118..00000000000 --- a/test/integration/targets/ops_command/tests/cli/invalid.yaml +++ /dev/null @@ -1,28 +0,0 @@ ---- -- debug: msg="START cli/invalid.yaml" - -- name: run invalid command - ops_command: - commands: ['show foo'] - provider: "{{ cli }}" - register: result - ignore_errors: yes - -- assert: - that: - - "result.failed" - -- name: run commands that include invalid command - ops_command: - commands: - - show version - - show foo - provider: "{{ cli }}" - register: result - ignore_errors: yes - -- assert: - that: - - "result.failed" - -- debug: msg="END cli/invalid.yaml" diff --git a/test/integration/targets/ops_command/tests/cli/output.yaml b/test/integration/targets/ops_command/tests/cli/output.yaml deleted file mode 100644 index 00201850e50..00000000000 --- a/test/integration/targets/ops_command/tests/cli/output.yaml +++ /dev/null @@ -1,29 +0,0 @@ ---- -- debug: msg="START cli/output.yaml" - -- name: get output for single command - ops_command: - commands: ['show version'] - provider: "{{ cli }}" - register: result - -- assert: - that: - - "result.changed == false" - - "result.stdout is defined" - -- name: get output for multiple commands - ops_command: - commands: - - show version - - show interface - provider: "{{ cli }}" - register: result - -- assert: - that: - - "result.changed == false" - - "result.stdout is defined" - - "result.stdout | length == 2" - -- debug: msg="END cli/output.yaml" diff --git a/test/integration/targets/ops_command/tests/cli/timeout.yaml b/test/integration/targets/ops_command/tests/cli/timeout.yaml deleted file mode 100644 index a55b56fde10..00000000000 --- a/test/integration/targets/ops_command/tests/cli/timeout.yaml +++ /dev/null @@ -1,19 +0,0 @@ ---- -- debug: msg="START cli/timeout.yaml" - -- name: test bad condition - ops_command: - commands: - - show version - wait_for: - - "result[0] contains bad_value_string" - provider: "{{ cli }}" - register: result - ignore_errors: yes - -- assert: - that: - - "result.failed == true" - - "result.msg is defined" - -- debug: msg="END cli/timeout.yaml"