Tests fail in non-en_US locale
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
Matt Riedemann |
Bug Description
When I run `tox -epy27`, generally I get 13 test failures. One of these is a proxy/WSGI interaction I don't care about. The remaining 12 are due to tests which compare translated strings to untranslated message IDs. My locale is:
$ locale
LANG=
LANGUAGE=
LC_
LC_
LC_
LC_
LC_
LC_
LC_
LC_
LC_
LC_
LC_
LC_
LC_ALL=
See this patch for the tests which fail for me: I352cd37d794018
This patch removes the TranslationFixture which was supposed to prevent translations during tests but didn't: Idcc4409edae5dd
Suggested fix: enforce an en_US locale or prevent translations from occurring during tests.
Changed in nova: | |
assignee: | nobody → Alexis Lee (alexisl) |
status: | New → In Progress |
Changed in nova: | |
importance: | Undecided → Medium |
Changed in nova: | |
milestone: | none → kilo-3 |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | kilo-3 → 2015.1.0 |
Example failure:
Traceback (most recent call last): unit/compute/ test_compute. py", line 6058, in test_cleanup_ running_ deleted_ instances_ unrecognized_ value
self.assertIn( "Unrecognized value", six.text_type(e)) lealexis/ w/nova/ .tox/py27/ local/lib/ python2. 7/site- packages/ testtools/ testcase. py", line 354, in assertIn
self.assertTha t(haystack, Contains(needle), message) lealexis/ w/nova/ .tox/py27/ local/lib/ python2. 7/site- packages/ testtools/ testcase. py", line 433, in assertThat deleted_ instance_ action"
File "nova/tests/
File "/home/
File "/home/
raise mismatch_error
MismatchError: 'Unrecognized value' not in u"Unrecognised value 'foo-action' for CONF.running_
'z' vs 's' in 'unrecognised'.