summaryrefslogtreecommitdiffstats
path: root/test/integration
diff options
context:
space:
mode:
authorSam Doran <sdoran@redhat.com>2021-02-23 16:21:28 +0100
committerGitHub <noreply@github.com>2021-02-23 16:21:28 +0100
commit3ab52f2965a3eb9f01324eca2856d0da82dc45b8 (patch)
treee428a891a813f1121173cac19cc89c2a363c0be5 /test/integration
parentMention `ansible-core` @ "Release and maintenance" (#73612) (diff)
downloadansible-3ab52f2965a3eb9f01324eca2856d0da82dc45b8.tar.xz
ansible-3ab52f2965a3eb9f01324eca2856d0da82dc45b8.zip
Disable junit callback on roles_arg_spec_tests (#73663)
This prevents the role arg spec validation tasks from showing up as failure in the CI output.
Diffstat (limited to 'test/integration')
-rwxr-xr-xtest/integration/targets/roles_arg_spec/runme.sh12
-rw-r--r--test/integration/targets/roles_arg_spec/test.yml10
2 files changed, 17 insertions, 5 deletions
diff --git a/test/integration/targets/roles_arg_spec/runme.sh b/test/integration/targets/roles_arg_spec/runme.sh
index 02eb961e16..680d9dd986 100755
--- a/test/integration/targets/roles_arg_spec/runme.sh
+++ b/test/integration/targets/roles_arg_spec/runme.sh
@@ -2,6 +2,18 @@
set -eux
+# This effectively disables junit callback output by directing the output to
+# a directory ansible-test will not look at.
+#
+# Since the failures in these tests are on the role arg spec validation and the
+# name for those tasks is fixed (we cannot add "EXPECTED FAILURE" to the name),
+# disabling the junit callback output is the easiest way to prevent these from
+# showing up in test run output.
+#
+# Longer term, an option can be added to the junit callback allowing a custom
+# regexp to be supplied rather than the hard coded "EXPECTED FAILURE".
+export JUNIT_OUTPUT_DIR="${OUTPUT_DIR}"
+
# Various simple role scenarios
ansible-playbook test.yml -i ../../inventory "$@"
diff --git a/test/integration/targets/roles_arg_spec/test.yml b/test/integration/targets/roles_arg_spec/test.yml
index 454b68de20..faed945afb 100644
--- a/test/integration/targets/roles_arg_spec/test.yml
+++ b/test/integration/targets/roles_arg_spec/test.yml
@@ -71,7 +71,7 @@
tasks:
- block:
- - name: "EXPECTED FAILURE: Invalid role usage"
+ - name: "Invalid role usage"
include_role:
name: b
vars:
@@ -114,7 +114,7 @@
tasks:
- block:
- - name: "EXPECTED FAILURE: Invalid role usage"
+ - name: "Invalid role usage"
import_role:
name: b
vars:
@@ -172,7 +172,7 @@
tasks:
- block:
- - name: "EXPECTED FAILURE: Test import_role of role C (missing a_str)"
+ - name: "Test import_role of role C (missing a_str)"
import_role:
name: c
vars:
@@ -197,7 +197,7 @@
- ansible_failed_result.argument_spec_data == main_expected_returned_spec
- block:
- - name: "EXPECTED FAILURE: Test include_role of role C (missing a_int from `alternate` entry point)"
+ - name: "Test include_role of role C (missing a_int from `alternate` entry point)"
include_role:
name: c
vars:
@@ -227,7 +227,7 @@
gather_facts: false
tasks:
- block:
- - name: "EXPECTED FAILURE: Test import_role of role role_with_no_tasks (missing a_str)"
+ - name: "Test import_role of role role_with_no_tasks (missing a_str)"
import_role:
name: role_with_no_tasks