Merge lp://qastaging/~doanac/utah/mir-bug into lp://qastaging/utah
Proposed by
Andy Doan
Status: | Merged |
---|---|
Merged at revision: | 974 |
Proposed branch: | lp://qastaging/~doanac/utah/mir-bug |
Merge into: | lp://qastaging/utah |
Diff against target: |
65 lines (+42/-0) 2 files modified
tests/test_rsyslog.py (+38/-0) utah/provisioning/rsyslog.py (+4/-0) |
To merge this branch: | bzr merge lp://qastaging/~doanac/utah/mir-bug |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
UTAH Dev | Pending | ||
Review via email:
|
Description of the change
This fixes a subtle problem with our fast-forward logic in the rsyslog module
To post a comment you must log in.
The changes look good and the test cases work.
Just for my own curiosity, I tried to check that the changes were not needed if the pattern are just strings (which are converted to arrays internally), but that didn't work. Shouldn't that have worked?
=== modified file 'tests/ test_rsyslog. py' rsyslog. py 2013-07-23 22:21:19 +0000 rsyslog. py 2013-07-24 16:55:22 +0000
"message" : "test_future",
"booted" : True,
"message" : "hit skipped",
"message" : "this will hit step three",
--- tests/test_
+++ tests/test_
@@ -162,16 +162,16 @@
steps = [
{
- "pattern": [".*"],
+ "pattern": ".*",
},
{
- "pattern": ["hit skipped"],
+ "pattern": "hit skipped",
},
{
- "pattern": [".*this will hit step three"],
+ "pattern": ".*this will hit step three",
},
]
=== modified file 'utah/provision ing/rsyslog. py' ng/rsyslog. py 2013-07-23 22:21:19 +0000 ng/rsyslog. py 2013-07-24 16:53:14 +0000
--- utah/provisioni
+++ utah/provisioni
@@ -216,12 +216,8 @@
if not isinstance(pattern, list):
pattern = [pattern] fail_pattern, list):
fail_pattern = [fail_pattern]
pattern. extend( fail_pattern)
future_ pats = self._future_ patterns( steps, x)
pattern. extend( future_ pats)
- else:
- pattern = pattern[:] # create a copy so we don't alter
if not isinstance(
- else:
- fail_pattern = fail_pattern[:]