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
eed4a2b7
Commit
eed4a2b7
authored
Apr 06, 2012
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update tests to use 127.0.0.2 to bypass the smart "use local connection" code, and also to reflect
that commands now trigger change events.
parent
da9d4eb2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
26 deletions
+35
-26
test/TestRunner.py
+2
-2
test/ansible_hosts
+1
-1
test/playbook1.events
+32
-23
No files found.
test/TestRunner.py
View file @
eed4a2b7
...
@@ -66,8 +66,8 @@ class TestRunner(unittest.TestCase):
...
@@ -66,8 +66,8 @@ class TestRunner(unittest.TestCase):
# when using nosetests this will only show up on failure
# when using nosetests this will only show up on failure
# which is pretty useful
# which is pretty useful
print
"RESULTS=
%
s"
%
results
print
"RESULTS=
%
s"
%
results
assert
"127.0.0.
1
"
in
results
[
'contacted'
]
assert
"127.0.0.
2
"
in
results
[
'contacted'
]
return
results
[
'contacted'
][
'127.0.0.
1
'
]
return
results
[
'contacted'
][
'127.0.0.
2
'
]
def
test_ping
(
self
):
def
test_ping
(
self
):
result
=
self
.
_run
(
'ping'
,[])
result
=
self
.
_run
(
'ping'
,[])
...
...
test/ansible_hosts
View file @
eed4a2b7
[somegroup]
[somegroup]
127.0.0.
1
127.0.0.
2
test/playbook1.events
View file @
eed4a2b7
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
[
[
"ok",
"ok",
[
[
"127.0.0.
1
",
"127.0.0.
2
",
{
{
"answer": "Wuh, I think so, Brain, but if we didn't have ears, we'd look like weasels.",
"answer": "Wuh, I think so, Brain, but if we didn't have ears, we'd look like weasels.",
"changed": true,
"changed": true,
...
@@ -23,21 +23,21 @@
...
@@ -23,21 +23,21 @@
[
[
"import",
"import",
[
[
"127.0.0.
1
",
"127.0.0.
2
",
"/home/mdehaan/ansible/test/common_vars.yml"
"/home/mdehaan/ansible/test/common_vars.yml"
]
]
],
],
[
[
"import",
"import",
[
[
"127.0.0.
1
",
"127.0.0.
2
",
"/home/mdehaan/ansible/test/CentOS.yml"
"/home/mdehaan/ansible/test/CentOS.yml"
]
]
],
],
[
[
"ok",
"ok",
[
[
"127.0.0.
1
",
"127.0.0.
2
",
{
{
"answer": "Wuh, I think so, Brain, but if we didn't have ears, we'd look like weasels.",
"answer": "Wuh, I think so, Brain, but if we didn't have ears, we'd look like weasels.",
"changed": true,
"changed": true,
...
@@ -60,8 +60,9 @@
...
@@ -60,8 +60,9 @@
[
[
"ok",
"ok",
[
[
"127.0.0.
1
",
"127.0.0.
2
",
{
{
"changed": true,
"cmd": [
"cmd": [
"/bin/true"
"/bin/true"
],
],
...
@@ -81,8 +82,9 @@
...
@@ -81,8 +82,9 @@
[
[
"ok",
"ok",
[
[
"127.0.0.
1
",
"127.0.0.
2
",
{
{
"changed": true,
"cmd": [
"cmd": [
"/bin/true"
"/bin/true"
],
],
...
@@ -102,8 +104,9 @@
...
@@ -102,8 +104,9 @@
[
[
"ok",
"ok",
[
[
"127.0.0.
1
",
"127.0.0.
2
",
{
{
"changed": true,
"cmd": "echo $HOME 5150 5150 ",
"cmd": "echo $HOME 5150 5150 ",
"rc": 0,
"rc": 0,
"stderr": "",
"stderr": "",
...
@@ -121,8 +124,9 @@
...
@@ -121,8 +124,9 @@
[
[
"ok",
"ok",
[
[
"127.0.0.
1
",
"127.0.0.
2
",
{
{
"changed": true,
"cmd": "echo quack moo default ",
"cmd": "echo quack moo default ",
"rc": 0,
"rc": 0,
"stderr": "",
"stderr": "",
...
@@ -140,7 +144,7 @@
...
@@ -140,7 +144,7 @@
[
[
"ok",
"ok",
[
[
"127.0.0.
1
",
"127.0.0.
2
",
{
{
"changed": true,
"changed": true,
"group": "root",
"group": "root",
...
@@ -154,7 +158,7 @@
...
@@ -154,7 +158,7 @@
[
[
"notify",
"notify",
[
[
"127.0.0.
1
",
"127.0.0.
2
",
"on change 1"
"on change 1"
]
]
],
],
...
@@ -168,7 +172,7 @@
...
@@ -168,7 +172,7 @@
[
[
"ok",
"ok",
[
[
"127.0.0.
1
",
"127.0.0.
2
",
{
{
"changed": true,
"changed": true,
"group": "root",
"group": "root",
...
@@ -182,14 +186,14 @@
...
@@ -182,14 +186,14 @@
[
[
"notify",
"notify",
[
[
"127.0.0.
1
",
"127.0.0.
2
",
"on change 1"
"on change 1"
]
]
],
],
[
[
"notify",
"notify",
[
[
"127.0.0.
1
",
"127.0.0.
2
",
"on change 2"
"on change 2"
]
]
],
],
...
@@ -203,7 +207,7 @@
...
@@ -203,7 +207,7 @@
[
[
"ok",
"ok",
[
[
"127.0.0.
1
",
"127.0.0.
2
",
{
{
"started": 1
"started": 1
}
}
...
@@ -212,7 +216,7 @@
...
@@ -212,7 +216,7 @@
[
[
"ok",
"ok",
[
[
"127.0.0.
1
",
"127.0.0.
2
",
{
{
"started": 1
"started": 1
}
}
...
@@ -221,14 +225,15 @@
...
@@ -221,14 +225,15 @@
[
[
"async poll",
"async poll",
[
[
"127.0.0.
1
"
"127.0.0.
2
"
]
]
],
],
[
[
"ok",
"ok",
[
[
"127.0.0.
1
",
"127.0.0.
2
",
{
{
"changed": true,
"cmd": "sleep 5 ",
"cmd": "sleep 5 ",
"finished": 1,
"finished": 1,
"rc": 0,
"rc": 0,
...
@@ -247,7 +252,7 @@
...
@@ -247,7 +252,7 @@
[
[
"skipped",
"skipped",
[
[
"127.0.0.
1
"
"127.0.0.
2
"
]
]
],
],
[
[
...
@@ -260,8 +265,9 @@
...
@@ -260,8 +265,9 @@
[
[
"ok",
"ok",
[
[
"127.0.0.
1
",
"127.0.0.
2
",
{
{
"changed": true,
"cmd": "echo 'this should fire once' ",
"cmd": "echo 'this should fire once' ",
"rc": 0,
"rc": 0,
"stderr": "",
"stderr": "",
...
@@ -272,8 +278,9 @@
...
@@ -272,8 +278,9 @@
[
[
"ok",
"ok",
[
[
"127.0.0.
1
",
"127.0.0.
2
",
{
{
"changed": true,
"cmd": "echo 'this should fire once' ",
"cmd": "echo 'this should fire once' ",
"rc": 0,
"rc": 0,
"stderr": "",
"stderr": "",
...
@@ -291,8 +298,9 @@
...
@@ -291,8 +298,9 @@
[
[
"ok",
"ok",
[
[
"127.0.0.
1
",
"127.0.0.
2
",
{
{
"changed": true,
"cmd": "echo 'this should fire once also' ",
"cmd": "echo 'this should fire once also' ",
"rc": 0,
"rc": 0,
"stderr": "",
"stderr": "",
...
@@ -302,8 +310,8 @@
...
@@ -302,8 +310,8 @@
]
]
],
],
"results": {
"results": {
"127.0.0.
1
": {
"127.0.0.
2
": {
"changed":
2
,
"changed":
9
,
"failures": 0,
"failures": 0,
"ok": 12,
"ok": 12,
"skipped": 1,
"skipped": 1,
...
@@ -311,3 +319,4 @@
...
@@ -311,3 +319,4 @@
}
}
}
}
}
}
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