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
This commit is contained in:
Kevin Breit 2019-11-20 08:24:12 -06:00 committed by Nathaniel Case
parent 502fc2087e
commit 2cf079bc8f
6 changed files with 4 additions and 157 deletions

View file

@ -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:

View file

@ -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:

View file

@ -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:

View file

@ -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:

View file

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

View file

@ -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: