tripleo-common stable/queens tox -e py27 failing on fedora base system
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
tripleo |
Fix Released
|
High
|
Unassigned |
Bug Description
I was testing out tripleo-common unittests on my local system fc27 and when I ran the tox unittests they failed, but they are passing in gates.
I ran:
tox -e py27
and it failed on my local system
I would expect it to pass
FAIL: tripleo_
big difference was
'config': '"#!/bin/
vs
'config': '#!/bin/bash\necho "A script"\n',
Note:
I verified that python virtual env was equivalent, and then also checked that a local spun up ubuntu env was passing
FAIL: tripleo_
tags: worker-1
-------
Traceback (most recent call last):
File "/home/
return func(*args, **keywargs)
File "tripleo_
self.
File "/home/
self.
File "/home/
raise mismatch_error
testtools.
reference = {'ControllerHos
...
actual = {'ControllerHos
...
Changed in tripleo: | |
milestone: | rocky-2 → rocky-3 |
Changed in tripleo: | |
milestone: | rocky-3 → rocky-rc1 |
Changed in tripleo: | |
milestone: | rocky-rc1 → stein-1 |
Changed in tripleo: | |
milestone: | stein-1 → stein-2 |
Changed in tripleo: | |
milestone: | stein-2 → stein-3 |
Changed in tripleo: | |
status: | Triaged → Fix Released |
I traced this down to:
# If the value is not a string already, pretty print it as a
data = json.dumps(data, indent=2)
isinstance( data, six.string_types)):
data = json.dumps(data, indent=2)
# string so it's rendered in a readable format.
if not isinstance(data, six.text_type):
vs
# If the value is not a string already, pretty print it as a
# string so it's rendered in a readable format.
if not (isinstance(data, six.text_type) or
The tests are failing because we're json.dumps() on a string which is adding in additional escaping.