Browse Source
Allow adding test application even when smoke tests are disabled
pull/50/head
Daria Mayorova
7 years ago
No known key found for this signature in database
GPG Key ID: 20B3A46283E97343
3 changed files with
15 additions and
1 deletions
README.md
defaults/main.yml
tasks/main.yml
@ -513,6 +513,15 @@ Override or update the list of supported OAuth flows for this API.
- `threescale_cicd_oicd_flows="{{ [ 'application', 'accessCode' ] }}"` (override the flow list)
- `threescale_cicd_oicd_flows="{{ [ 'application', 'accessCode' ] }}"` (override the flow list)
- `threescale_cicd_oicd_flows="{{ [ 'application', threescale_cicd_api_security_scheme.flow ] }}"` (add a flow)
- `threescale_cicd_oicd_flows="{{ [ 'application', threescale_cicd_api_security_scheme.flow ] }}"` (add a flow)
### `threescale_cicd_create_default_application`
Allows to create a test application with the default application plan, whether smoke tests are enabled or not.
- **Syntax:** boolean (`yes`, `no` , `true` , `false` )
- **Required:** no
- **Default value:** `no`
- **Example:** `yes` if you want a default application to be created
### Miscellaneous variables
### Miscellaneous variables
Miscellaneous variables defined in [defaults/main.yml ](defaults/main.yml )
Miscellaneous variables defined in [defaults/main.yml ](defaults/main.yml )
@ -90,6 +90,11 @@ threescale_cicd_default_application_plan: '{{ (threescale_cicd_application_plans
threescale_cicd_default_application_appid : '{{ (threescale_cicd_default_application_name ~ threescale_cicd_api_system_name ~ threescale_cicd_access_token)|hash(' 'sha1' ') }}'
threescale_cicd_default_application_appid : '{{ (threescale_cicd_default_application_name ~ threescale_cicd_api_system_name ~ threescale_cicd_access_token)|hash(' 'sha1' ') }}'
threescale_cicd_default_application_appsecret : '{{ (' 'secret' ' ~ threescale_cicd_default_application_name ~ threescale_cicd_api_system_name ~ threescale_cicd_access_token)|hash(' 'sha1' ') }}'
threescale_cicd_default_application_appsecret : '{{ (' 'secret' ' ~ threescale_cicd_default_application_name ~ threescale_cicd_api_system_name ~ threescale_cicd_access_token)|hash(' 'sha1' ') }}'
##
## Create test application whether or not smoke tests are enabled
##
threescale_cicd_create_default_application : no
# The OpenAPI Operation to use for the smoketest
# The OpenAPI Operation to use for the smoketest
threescale_cicd_openapi_smoketest_operation : '{{ threescale_cicd_openapi_file_content|json_query(' 'paths.*.get[? "x-threescale-smoketests-operation" ].operationId' ')|first|default("")|regex_replace(' '[^0-9a-zA-Z_]+' ', ' '_' ') }}'
threescale_cicd_openapi_smoketest_operation : '{{ threescale_cicd_openapi_file_content|json_query(' 'paths.*.get[? "x-threescale-smoketests-operation" ].operationId' ')|first|default("")|regex_replace(' '[^0-9a-zA-Z_]+' ', ' '_' ') }}'
@ -43,7 +43,7 @@
# Create or update the default application if smoke tests are needed
# Create or update the default application if smoke tests are needed
- include_tasks : steps/default_application.yml
- include_tasks : steps/default_application.yml
when : ' threescale_cicd_openapi_smoketest_operation|length > 0 and threescale_cicd_application_plans is defined'
when : ( threescale_cicd_openapi_smoketest_operation|length > 0 or threescale_cicd_create_default_application|bool) and threescale_cicd_application_plans is defined
# Run smoke tests on the staging gateway
# Run smoke tests on the staging gateway
- include_tasks : steps/smoke_test.yml
- include_tasks : steps/smoke_test.yml