Meraki - Remove integration tests which work with HTTP respons… (#64975)

- These are modular level and I'm not catching these anyways
- More appropriate for unit tests, at least for HTTPS
pull/65117/head
Kevin Breit 5 years ago committed by Nathaniel Case
parent 502fc2087e
commit 2cf079bc8f

@ -9,22 +9,6 @@
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:
auth_key: '{{auth_key}}'

@ -9,33 +9,6 @@
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:
auth_key: '{{ auth_key }}'

@ -9,33 +9,6 @@
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:
auth_key: '{{auth_key}}'

@ -8,34 +8,6 @@
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:
auth_key: '{{auth_key}}'

@ -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}}'

@ -9,33 +9,6 @@
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:
state: present

Loading…
Cancel
Save