Skip to content

Commit

Permalink
Separate out timeouts into CI configuration (contributes to IBM-Block…
Browse files Browse the repository at this point in the history
…chain#71)

Signed-off-by: Simon Stone <[email protected]>
  • Loading branch information
Simon Stone committed Jun 18, 2020
1 parent 41ffe4d commit ba86279
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
2 changes: 2 additions & 0 deletions tests/integration/integration_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ api_endpoint: https://ibp-console.example.org:32000
api_authtype: basic
api_key: xxxxxxxx
api_secret: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
api_timeout: 60
k8s_namespace: ibp
test_run_id: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
short_test_run_id: xxxxxxxx
wait_timeout: 600
27 changes: 26 additions & 1 deletion tests/integration/targets/certificate_authority/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
api_authtype: "{{ api_authtype | mandatory }}"
api_key: "{{ api_key | mandatory }}"
api_secret: "{{ api_secret | mandatory }}"
api_timeout: "{{ api_timeout | mandatory }}"
ca_name: "Test CA {{ short_test_run_id }}"
ca_config_override:
ca:
Expand All @@ -29,7 +30,7 @@
hf.AffiliationMgr: true
k8s_namespace: "{{ k8s_namespace | mandatory }}"
k8s_name: "testca{{ short_test_run_id }}"
wait_timeout: 600
wait_timeout: "{{ wait_timeout | mandatory }}"

- name: Run tests
block:
Expand Down Expand Up @@ -95,6 +96,30 @@
expected_storage_class: default
expected_storage_size: 20Gi

- name: Ensure idempotency
ibm.blockchain_platform.certificate_authority:
state: present
<<: *ibp_connection_info
name: "{{ ca_name }}"
config_override: "{{ ca_config_override }}"
resources:
ca:
requests:
cpu: 200m
memory: 400M
wait_timeout: "{{ wait_timeout }}"
register: result

- include_tasks: assertions.yml
vars:
expected_change: no
expected_enrollment_id: admin
expected_enrollment_secret: adminpw
expected_cpu: 200m
expected_memory: 400M
expected_storage_class: default
expected_storage_size: 20Gi

always:
- name: Delete certificate authority
ibm.blockchain_platform.certificate_authority:
Expand Down

0 comments on commit ba86279

Please sign in to comment.