From adcff8fa424fb611272fca4d3167f0fcc107e235 Mon Sep 17 00:00:00 2001 From: Bruno Goncalves Date: Oct 11 2019 13:27:06 +0000 Subject: don't fail playbook if there was error running test avoid confusion to distinguish test failure from infrastructure failure Without this fix when test reports error the playbook will exit with error and report infrastructure error, but this is actually a test error and package maintainer should be informed betterthat the failure was not some infra failure. The CI pipeline sends different topic in case of test or infra issue, in case the test exits with ERROR we are sending infra topic because the playbook exits with error, but for package maintainer is much harder to see what failed and he can think the pipeline failed because of infra outage instead of fixing the test. We currently consider as Infra Error: If any Beaker test ends in ERROR? The fix says from you says: 1. Continue running other tests. 2. Do not report beaker execution test as infra error. If yes, then this this makes sense. --- diff --git a/roles/str-common-final/tasks/main.yml b/roles/str-common-final/tasks/main.yml index 01a7a18..2e6d521 100644 --- a/roles/str-common-final/tasks/main.yml +++ b/roles/str-common-final/tasks/main.yml @@ -15,4 +15,3 @@ {{ role_message|d('None') }} debug: msg: "{{ msg.split('\n') }}" - failed_when: role_result == 'ERROR' diff --git a/tests/basic.yml b/tests/basic.yml index cc0d43f..6d1589b 100644 --- a/tests/basic.yml +++ b/tests/basic.yml @@ -53,7 +53,6 @@ - role: standard-test-basic tests: - test-basic-fail - ignore_errors: yes tasks: # 'verify_failed_test' tasks should run after 'test-basic-fail' - import_tasks: shared-tasks/verify_failed_test.yml @@ -87,7 +86,6 @@ - test-basic-timeout-fail: dir: test-basic-timeout timeout: 1 - ignore_errors: yes tasks: # 'verify_error_test' tasks should run after 'test-basic-timeout-fail' - import_tasks: shared-tasks/verify_error_test.yml diff --git a/tests/beakerlib.yml b/tests/beakerlib.yml index 1ace566..545b5af 100644 --- a/tests/beakerlib.yml +++ b/tests/beakerlib.yml @@ -27,7 +27,6 @@ - role: standard-test-beakerlib tests: - test-beakerlib-fail - ignore_errors: yes tasks: # 'tests_verify_failed_test' tasks should run after 'test-beakerlib-fail' - import_tasks: shared-tasks/verify_failed_test.yml @@ -60,7 +59,6 @@ tests: - test-beakerlib-timeout: timeout: 1 - ignore_errors: yes tasks: # 'tests_verify_error_test' tasks should run after 'test-beakerlib-timeout' - import_tasks: shared-tasks/verify_error_test.yml