Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
5c39538a
Commit
5c39538a
authored
Oct 02, 2015
by
Brian Coca
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added no_log tests as per #12214
parent
ba4afcbb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
84 additions
and
1 deletions
+84
-1
test/integration/Makefile
+5
-1
test/integration/no_log_local.yml
+79
-0
No files found.
test/integration/Makefile
View file @
5c39538a
...
...
@@ -21,7 +21,7 @@ VAULT_PASSWORD_FILE = vault-password
CONSUL_RUNNING
:=
$(
shell
python consul_running.py
)
all
:
parsing test_var_precedence unicode test_templating_settings environment non_destructive destructive includes check_mode test_hash test_handlers test_group_by test_vault test_tags test_lookup_paths
all
:
parsing test_var_precedence unicode test_templating_settings environment non_destructive destructive includes check_mode test_hash test_handlers test_group_by test_vault test_tags test_lookup_paths
no_log
parsing
:
ansible-playbook bad_parsing.yml
-i
$(INVENTORY)
-e
@
$(VARS_FILE)
$(CREDENTIALS_ARG)
-vvv
$(TEST_FLAGS)
--tags
prepare,common,scenario5
...
...
@@ -190,3 +190,7 @@ test_galaxy_yaml:
test_lookup_paths
:
ansible-playbook lookup_paths/play.yml
-i
$(INVENTORY)
-v
$(TEST_FLAGS)
no_log
:
[
"
$$
(ansible-playbook no_log_local.yml -i
$(INVENTORY)
-vvvvv | grep DO_NOT_LOG)"
=
""
]
test/integration/no_log_local.yml
0 → 100644
View file @
5c39538a
# TODO: test against real connection plugins to ensure they're not leaking module args
-
name
:
normal play
hosts
:
testhost
gather_facts
:
no
tasks
:
-
name
:
args should be logged in the absence of no_log
shell
:
echo "LOG_ME_TASK_SUCCEEDED"
-
name
:
item args/results should be logged in the absence of no_log
shell
:
echo {{ item }}
with_items
:
[
"
LOG_ME_ITEM_SUCCEEDED"
]
-
name
:
failed args should be logged in the absence of no_log
shell
:
echo "LOG_ME_TASK_FAILED"
failed_when
:
true
ignore_errors
:
true
-
name
:
failed item args should be logged in the absence of no_log
shell
:
echo {{ item }}
with_items
:
[
"
LOG_ME_ITEM_FAILED"
]
failed_when
:
true
ignore_errors
:
true
-
name
:
args should not be logged when task-level no_log set
shell
:
echo "DO_NOT_LOG_TASK_SUCCEEDED"
no_log
:
true
-
name
:
item args should be suppressed with no_log
shell
:
echo {{ item }}
no_log
:
true
with_items
:
[
"
DO_NOT_LOG_ITEM_SUCCEEDED"
]
-
name
:
failed args should not be logged when task-level no_log set
shell
:
echo "DO_NOT_LOG_TASK_FAILED"
no_log
:
true
failed_when
:
true
ignore_errors
:
true
-
name
:
failed item args should be suppressed with no_log
shell
:
echo {{ item }}
no_log
:
true
with_items
:
[
"
DO_NOT_LOG_ITEM_FAILED"
]
failed_when
:
true
ignore_errors
:
true
-
name
:
skipped task args should be suppressed with no_log
shell
:
echo "DO_NOT_LOG_TASK_SKIPPED"
no_log
:
true
when
:
false
-
name
:
skipped item args should be suppressed with no_log
shell
:
echo {{ item }}
no_log
:
true
with_items
:
[
"
DO_NOT_LOG_ITEM_SKIPPED"
,
"
DO_NOT_LOG_ITEM_SKIPPED_2"
]
when
:
item == False
-
name
:
async task args should suppressed with no_log
async
:
10
poll
:
1
shell
:
echo "DO_NOT_LOG_ASYNC_TASK_SUCCEEDED"
no_log
:
true
-
name
:
play-level no_log set
hosts
:
testhost
gather_facts
:
no
no_log
:
true
tasks
:
-
name
:
args should not be logged when play-level no_log set
shell
:
echo "DO_NOT_LOG_PLAY"
-
name
:
args should not be logged when both play- and task-level no_log set
shell
:
echo "DO_NOT_LOG_TASK_AND_PLAY"
no_log
:
true
-
name
:
args should be logged when task-level no_log overrides play-level
shell
:
echo "LOG_ME_OVERRIDE"
no_log
:
false
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment