Refactoring 75/20875/3
authorRomanos Skiadas <rski@intracom-telecom.com>
Fri, 9 Sep 2016 12:59:16 +0000 (15:59 +0300)
committerRomanos Skiadas <rski@intracom-telecom.com>
Thu, 15 Sep 2016 07:48:51 +0000 (10:48 +0300)
commit2b56065d82fa7cdb7063ff48933643f9aa994881
treeb44daed13358e338edf58399fcb228427564a9b1
parentcfa216a9c405c2a66f4909945ee0da1e7d91f1bb
Refactoring

- Wrap common methods that use globals in a Class
 `get_ping_status` and `add_to_summary` depended on globals for
  statefulness. The easiest way to refactor them was to convert them
  into methods and the globals they used into instance variables.
- Move `generate_userdata_common` and `generate_userdata_with_ssh` to
  the utils module.
- Make flavor a kwarg in create_instance.
  Add a defaults section in config.yaml with flavor. This value is used
  if flavor is not passed via kwargs.
- Substitute some sleeps with `wait_for_instances_up` which will
  wait until a dhcp lease success message appears in the instance's log.
- Add functions that wait until router and network association is
  completed. These do not replace the sleeps but make the tests more
  deterministic.
- Remove unused ping_timeout from config.yaml

Change-Id: Ia68ebf47aaa5a58c4e20267f1476db626f015a7c
Signed-off-by: Romanos Skiadas <rski@intracom-telecom.com>
Co-Authored-by: George Paraskevopoulos <geopar@intracom-telecom.com>
test/functest/config.yaml
test/functest/results.py [new file with mode: 0644]
test/functest/testcase_1.py
test/functest/testcase_2.py
test/functest/testcase_4.py
test/functest/utils.py