[
https://issues.apache.org/jira/browse/AMBARI-8910?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dmitry Lysnichenko resolved AMBARI-8910.
----------------------------------------
Resolution: Fixed
committed to trunk
> Fix agent unittests to run with python2.6
> -----------------------------------------
>
> Key: AMBARI-8910
> URL: https://issues.apache.org/jira/browse/AMBARI-8910
> Project: Ambari
> Issue Type: Task
> Components: ambari-agent
> Affects Versions: 2.0.0
> Reporter: Dmitry Lysnichenko
> Assignee: Dmitry Lysnichenko
> Fix For: 2.0.0
>
> Attachments: AMBARI-8910.patch
>
>
> Agent unittests are failing on python 2.6:
> {code}
> Traceback (most recent call last):
> File "/home/user/ambari/ambari-agent/src/test/python/unitTests.py", line
> 130, in <module>
> main()
> File "/home/user/ambari/ambari-agent/src/test/python/unitTests.py", line
> 95, in main
> suite = all_tests_suite()
> File "/home/user/ambari/ambari-agent/src/test/python/unitTests.py", line
> 86, in all_tests_suite
> suite = unittest.TestLoader().loadTestsFromNames(tests_list)
> File "/usr/lib64/python2.6/unittest.py", line 612, in loadTestsFromNames
> suites = [self.loadTestsFromName(name, module) for name in names]
> File "/usr/lib64/python2.6/unittest.py", line 575, in loadTestsFromName
> module = __import__('.'.join(parts_copy))
> File
> "/home/user/ambari/ambari-agent/src/test/python/resource_management/TestSecurityCommons.py",
> line 32
> params["config_file"]["property1"] = {"firstCase"}
> ^
> SyntaxError: invalid syntax
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)