From 2cf079bc8fb0bfc21df9173f6abe1910448af1ff Mon Sep 17 00:00:00 2001 From: Kevin Breit Date: Wed, 20 Nov 2019 08:24:12 -0600 Subject: [PATCH] =?UTF-8?q?Meraki=20-=20Remove=20integration=20tests=20whi?= =?UTF-8?q?ch=20work=20with=20HTTP=20respons=E2=80=A6=20(#64975)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - These are modular level and I'm not catching these anyways - More appropriate for unit tests, at least for HTTPS --- .../meraki_config_template/tasks/main.yml | 16 --------- .../meraki_mx_l3_firewall/tasks/main.yml | 27 -------------- .../targets/meraki_ssid/tasks/main.yml | 27 -------------- .../targets/meraki_switchport/tasks/main.yml | 28 --------------- .../targets/meraki_syslog/tasks/main.yml | 36 +++---------------- .../targets/meraki_vlan/tasks/main.yml | 27 -------------- 6 files changed, 4 insertions(+), 157 deletions(-) diff --git a/test/integration/targets/meraki_config_template/tasks/main.yml b/test/integration/targets/meraki_config_template/tasks/main.yml index 5785804780c..12b18d1a280 100644 --- a/test/integration/targets/meraki_config_template/tasks/main.yml +++ b/test/integration/targets/meraki_config_template/tasks/main.yml @@ -8,22 +8,6 @@ fail: msg: Please define an API key when: auth_key is not defined - - - name: Use an invalid domain - meraki_config_template: - auth_key: '{{ auth_key }}' - host: marrrraki.com - state: query - org_name: '{{test_org_name}}' - output_level: debug - delegate_to: localhost - register: invalid_domain - ignore_errors: yes - - - name: Connection assertions - assert: - that: - - '"Failed to connect to" in invalid_domain.msg' - name: Query all configuration templates meraki_config_template: diff --git a/test/integration/targets/meraki_mx_l3_firewall/tasks/main.yml b/test/integration/targets/meraki_mx_l3_firewall/tasks/main.yml index a25fc5ae839..cc70f9788c7 100644 --- a/test/integration/targets/meraki_mx_l3_firewall/tasks/main.yml +++ b/test/integration/targets/meraki_mx_l3_firewall/tasks/main.yml @@ -8,33 +8,6 @@ fail: msg: Please define an API key when: auth_key is not defined - - - name: Use an invalid domain - meraki_organization: - auth_key: '{{ auth_key }}' - host: marrrraki.com - state: present - org_name: IntTestOrg - output_level: debug - delegate_to: localhost - register: invalid_domain - ignore_errors: yes - - - name: Disable HTTP - meraki_organization: - auth_key: '{{ auth_key }}' - use_https: false - state: query - output_level: debug - delegate_to: localhost - register: http - ignore_errors: yes - - - name: Connection assertions - assert: - that: - - '"Failed to connect to" in invalid_domain.msg' - - '"http" in http.url' - name: Create network meraki_network: diff --git a/test/integration/targets/meraki_ssid/tasks/main.yml b/test/integration/targets/meraki_ssid/tasks/main.yml index 36968dbe914..66291766cf5 100644 --- a/test/integration/targets/meraki_ssid/tasks/main.yml +++ b/test/integration/targets/meraki_ssid/tasks/main.yml @@ -8,33 +8,6 @@ fail: msg: Please define an API key when: auth_key is not defined - - - name: Use an invalid domain - meraki_organization: - auth_key: '{{ auth_key }}' - host: marrrraki.com - state: present - org_name: IntTestOrg - output_level: debug - delegate_to: localhost - register: invalid_domain - ignore_errors: yes - - - name: Disable HTTP - meraki_organization: - auth_key: '{{ auth_key }}' - use_https: false - state: query - output_level: debug - delegate_to: localhost - register: http - ignore_errors: yes - - - name: Connection assertions - assert: - that: - # - '"Failed to connect to" in invalid_domain.msg' - - '"http" in http.url' - name: Create test network meraki_network: diff --git a/test/integration/targets/meraki_switchport/tasks/main.yml b/test/integration/targets/meraki_switchport/tasks/main.yml index 5d66428bbd4..8146f2845cc 100644 --- a/test/integration/targets/meraki_switchport/tasks/main.yml +++ b/test/integration/targets/meraki_switchport/tasks/main.yml @@ -7,34 +7,6 @@ fail: msg: Please define an API key when: auth_key is not defined - -- name: Use an invalid domain - meraki_switchport: - auth_key: '{{ auth_key }}' - host: marrrraki.com - state: query - serial: Q2HP-2C6E-GTLD - org_name: IntTestOrg - delegate_to: localhost - register: invaliddomain - ignore_errors: yes - -- name: Disable HTTP - meraki_switchport: - auth_key: '{{ auth_key }}' - use_https: false - state: query - serial: Q2HP-2C6E-GTLD - output_level: debug - delegate_to: localhost - register: http - ignore_errors: yes - -- name: Connection assertions - assert: - that: - - '"Failed to connect to" in invaliddomain.msg' - - '"http" in http.url' - name: Query all switchports meraki_switchport: diff --git a/test/integration/targets/meraki_syslog/tasks/main.yml b/test/integration/targets/meraki_syslog/tasks/main.yml index 5a6b26279c5..e2fdd6c8dbe 100644 --- a/test/integration/targets/meraki_syslog/tasks/main.yml +++ b/test/integration/targets/meraki_syslog/tasks/main.yml @@ -4,38 +4,10 @@ # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) --- - block: - # - name: Test an API key is provided - # fail: - # msg: Please define an API key - # when: auth_key is not defined - - # - name: Use an invalid domain - # meraki_switchport: - # auth_key: '{{ auth_key }}' - # host: marrrraki.com - # state: query - # serial: Q2HP-2C6E-GTLD - # org_name: IntTestOrg - # delegate_to: localhost - # register: invaliddomain - # ignore_errors: yes - - # - name: Disable HTTP - # meraki_switchport: - # auth_key: '{{ auth_key }}' - # use_https: false - # state: query - # serial: Q2HP-2C6E- - # output_level: debug - # delegate_to: localhost - # register: http - # ignore_errors: yes - - # - name: Connection assertions - # assert: - # that: - # - '"Failed to connect to" in invaliddomain.msg' - # - '"http" in http.url' + - name: Test an API key is provided + fail: + msg: Please define an API key + when: auth_key is not defined - set_fact: syslog_test_net_name: 'syslog_{{test_net_name}}' diff --git a/test/integration/targets/meraki_vlan/tasks/main.yml b/test/integration/targets/meraki_vlan/tasks/main.yml index c61ed032b5b..0f3cd233a83 100644 --- a/test/integration/targets/meraki_vlan/tasks/main.yml +++ b/test/integration/targets/meraki_vlan/tasks/main.yml @@ -8,33 +8,6 @@ fail: msg: Please define an API key when: auth_key is not defined - - - name: Use an invalid domain - meraki_vlan: - auth_key: '{{ auth_key }}' - host: marrrraki.com - state: present - org_name: IntTestOrg - output_level: debug - delegate_to: localhost - register: invalid_domain - ignore_errors: yes - - - name: Disable HTTPS - meraki_vlan: - auth_key: '{{ auth_key }}' - use_https: false - state: query - output_level: debug - delegate_to: localhost - register: http - ignore_errors: yes - - - name: Connection assertions - assert: - that: - - '"Failed to connect to" in invalid_domain.msg' - - '"http" in http.url' - name: Test play without auth_key meraki_network: