Browse Source

see #31: fix undefined variable in public urls + throttling

pull/42/head
Nicolas Massé 7 years ago
parent
commit
6176c45600
  1. 2
      tests/inventory.j2
  2. 12
      tests/test-cases/03-multi-environment.yml

2
tests/inventory.j2

@ -20,7 +20,7 @@ threescale_cicd_sso_issuer_endpoint=https://{{ test_environment.sso.client_id }}
{% if 'wildcard_domain' in test_environment.threescale %} {% if 'wildcard_domain' in test_environment.threescale %}
threescale_cicd_wildcard_domain={{ test_environment.threescale.wildcard_domain }} threescale_cicd_wildcard_domain={{ test_environment.threescale.wildcard_domain }}
{% endif %} {% endif %}
{% if test_environment.threescale.admin_portal is not match(".*[.]3scale[.]net") %}
# Disable throttling when running on-premises # Disable throttling when running on-premises
{% if test_environment.threescale.admin_portal is match(".*[.]3scale[.]net") %}
threescale_cicd_throttling=0 threescale_cicd_throttling=0
{% endif %} {% endif %}

12
tests/test-cases/03-multi-environment.yml

@ -17,22 +17,22 @@
name: 'nmasse-itix.threescale-cicd' name: 'nmasse-itix.threescale-cicd'
vars: vars:
threescale_cicd_api_environment_name: dev threescale_cicd_api_environment_name: dev
threescale_cicd_apicast_sandbox_endpoint: '{{ threescale_cicd_default_apicast_scheme }}://{{ (threescale_cicd_api_environment_name ~ "-" ~ threescale_cicd_api_base_system_name ~ "-" ~ threescale_cicd_api_version_major)|regex_replace(''[^a-zA-Z0-9-]+'', ''-'')|lower }}{{ threescale_cicd_default_staging_suffix }}.{{ apicast_staging_domain }}' threescale_cicd_apicast_sandbox_endpoint: '{{ threescale_cicd_default_apicast_scheme }}://{{ (threescale_cicd_api_environment_name ~ "-" ~ threescale_cicd_api_base_system_name ~ "-" ~ threescale_cicd_api_version_major)|regex_replace(''[^a-zA-Z0-9-]+'', ''-'')|lower }}{{ threescale_cicd_default_staging_suffix }}.{{ apicast_staging_domain|default(threescale_cicd_wildcard_domain) }}'
threescale_cicd_apicast_production_endpoint: '{{ threescale_cicd_default_apicast_scheme }}://{{ (threescale_cicd_api_environment_name ~ "-" ~threescale_cicd_api_base_system_name ~ "-" ~ threescale_cicd_api_version_major)|regex_replace(''[^a-zA-Z0-9-]+'', ''-'')|lower }}{{ threescale_cicd_default_production_suffix }}.{{ apicast_production_domain }}' threescale_cicd_apicast_production_endpoint: '{{ threescale_cicd_default_apicast_scheme }}://{{ (threescale_cicd_api_environment_name ~ "-" ~threescale_cicd_api_base_system_name ~ "-" ~ threescale_cicd_api_version_major)|regex_replace(''[^a-zA-Z0-9-]+'', ''-'')|lower }}{{ threescale_cicd_default_production_suffix }}.{{ apicast_production_domain|default(threescale_cicd_wildcard_domain) }}'
# Deploy in TEST # Deploy in TEST
- import_role: - import_role:
name: 'nmasse-itix.threescale-cicd' name: 'nmasse-itix.threescale-cicd'
vars: vars:
threescale_cicd_api_environment_name: test threescale_cicd_api_environment_name: test
threescale_cicd_apicast_sandbox_endpoint: '{{ threescale_cicd_default_apicast_scheme }}://{{ (threescale_cicd_api_environment_name ~ "-" ~ threescale_cicd_api_base_system_name ~ "-" ~ threescale_cicd_api_version_major)|regex_replace(''[^a-zA-Z0-9-]+'', ''-'')|lower }}{{ threescale_cicd_default_staging_suffix }}.{{ apicast_staging_domain }}' threescale_cicd_apicast_sandbox_endpoint: '{{ threescale_cicd_default_apicast_scheme }}://{{ (threescale_cicd_api_environment_name ~ "-" ~ threescale_cicd_api_base_system_name ~ "-" ~ threescale_cicd_api_version_major)|regex_replace(''[^a-zA-Z0-9-]+'', ''-'')|lower }}{{ threescale_cicd_default_staging_suffix }}.{{ apicast_staging_domain|default(threescale_cicd_wildcard_domain) }}'
threescale_cicd_apicast_production_endpoint: '{{ threescale_cicd_default_apicast_scheme }}://{{ (threescale_cicd_api_environment_name ~ "-" ~threescale_cicd_api_base_system_name ~ "-" ~ threescale_cicd_api_version_major)|regex_replace(''[^a-zA-Z0-9-]+'', ''-'')|lower }}{{ threescale_cicd_default_production_suffix }}.{{ apicast_production_domain }}' threescale_cicd_apicast_production_endpoint: '{{ threescale_cicd_default_apicast_scheme }}://{{ (threescale_cicd_api_environment_name ~ "-" ~threescale_cicd_api_base_system_name ~ "-" ~ threescale_cicd_api_version_major)|regex_replace(''[^a-zA-Z0-9-]+'', ''-'')|lower }}{{ threescale_cicd_default_production_suffix }}.{{ apicast_production_domain|default(threescale_cicd_wildcard_domain) }}'
# Deploy in PROD # Deploy in PROD
- import_role: - import_role:
name: 'nmasse-itix.threescale-cicd' name: 'nmasse-itix.threescale-cicd'
vars: vars:
threescale_cicd_api_environment_name: prod threescale_cicd_api_environment_name: prod
threescale_cicd_apicast_sandbox_endpoint: '{{ threescale_cicd_default_apicast_scheme }}://{{ (threescale_cicd_api_environment_name ~ "-" ~ threescale_cicd_api_base_system_name ~ "-" ~ threescale_cicd_api_version_major)|regex_replace(''[^a-zA-Z0-9-]+'', ''-'')|lower }}{{ threescale_cicd_default_staging_suffix }}.{{ apicast_staging_domain }}' threescale_cicd_apicast_sandbox_endpoint: '{{ threescale_cicd_default_apicast_scheme }}://{{ (threescale_cicd_api_environment_name ~ "-" ~ threescale_cicd_api_base_system_name ~ "-" ~ threescale_cicd_api_version_major)|regex_replace(''[^a-zA-Z0-9-]+'', ''-'')|lower }}{{ threescale_cicd_default_staging_suffix }}.{{ apicast_staging_domain|default(threescale_cicd_wildcard_domain) }}'
threescale_cicd_apicast_production_endpoint: '{{ threescale_cicd_default_apicast_scheme }}://{{ (threescale_cicd_api_environment_name ~ "-" ~threescale_cicd_api_base_system_name ~ "-" ~ threescale_cicd_api_version_major)|regex_replace(''[^a-zA-Z0-9-]+'', ''-'')|lower }}{{ threescale_cicd_default_production_suffix }}.{{ apicast_production_domain }}' threescale_cicd_apicast_production_endpoint: '{{ threescale_cicd_default_apicast_scheme }}://{{ (threescale_cicd_api_environment_name ~ "-" ~threescale_cicd_api_base_system_name ~ "-" ~ threescale_cicd_api_version_major)|regex_replace(''[^a-zA-Z0-9-]+'', ''-'')|lower }}{{ threescale_cicd_default_production_suffix }}.{{ apicast_production_domain|default(threescale_cicd_wildcard_domain) }}'
# Cleanup the DEV # Cleanup the DEV
- import_role: - import_role:
name: 'nmasse-itix.threescale-cicd' name: 'nmasse-itix.threescale-cicd'

Loading…
Cancel
Save