#81 Refactoring module_framework.py into more classes and Exceptions into alone exception.py class
Closed by phracek. Opened by phracek.
refactoring_avocado_tests  into  master

Download 81.patch

This PR contains:
- updating SPEC file - Requires: python-retrying
- splitting module_framework.py into more helpers and avocado_testers classes. For better handling and code readability.
- MTF exceptions should be in alone exception.py class. So we have file for it.
- Moving CommonFunctions class from module_framework.py into common.py.

@jscotka @ttomecek Please have a look on it. Critical comments are welcome.
I have tried it and all seems to be working properly. On memcached module.

[sudo] password for phracek: 
cd tests; MODULE=docker MODULEMD=file://memcached.yaml URL="docker.io/modularitycontainers/memcached" make all
make[1]: Entering directory '/home/phracek/work/FedoraModules/memcached/tests'
mtf-generator
Added test (runmethod: run): processrunning
Added test (runmethod: runHost): selfcheck
Added test (runmethod: runHost): selcheckError
python -m avocado run --filter-by-tags=-WIP /home/phracek/work/programming/modularity-testing-framework/tools/modulelint.py *.py
JOB ID     : 51451e6e28b2c1322ff87858d92c7adfe4f73ad5
JOB LOG    : /root/avocado/job-results/job-2017-07-12T15.13-51451e6/job.log
 (01/20) /home/phracek/work/programming/modularity-testing-framework/tools/modulelint.py:DockerfileLinter.testDockerFromBaseruntime: PASS (0.01 s)
 (02/20) /home/phracek/work/programming/modularity-testing-framework/tools/modulelint.py:DockerfileLinter.testDockerRunMicrodnf: PASS (0.01 s)
 (03/20) /home/phracek/work/programming/modularity-testing-framework/tools/modulelint.py:DockerfileLinter.testArchitectureInEnvAndLabelExists: PASS (0.01 s)
 (04/20) /home/phracek/work/programming/modularity-testing-framework/tools/modulelint.py:DockerfileLinter.testNameInEnvAndLabelExists: PASS (0.02 s)
 (05/20) /home/phracek/work/programming/modularity-testing-framework/tools/modulelint.py:DockerfileLinter.testReleaseLabelExists: PASS (0.02 s)
 (06/20) /home/phracek/work/programming/modularity-testing-framework/tools/modulelint.py:DockerfileLinter.testVersionLabelExists: PASS (0.01 s)
 (07/20) /home/phracek/work/programming/modularity-testing-framework/tools/modulelint.py:DockerfileLinter.testComRedHatComponentLabelExists: PASS (0.01 s)
 (08/20) /home/phracek/work/programming/modularity-testing-framework/tools/modulelint.py:DockerfileLinter.testIok8sDescriptionExists: PASS (0.01 s)
 (09/20) /home/phracek/work/programming/modularity-testing-framework/tools/modulelint.py:DockerfileLinter.testIoOpenshiftExposeServicesExists: PASS (0.02 s)
 (10/20) /home/phracek/work/programming/modularity-testing-framework/tools/modulelint.py:DockerfileLinter.testIoOpenShiftTagsExists: PASS (0.02 s)
 (11/20) /home/phracek/work/programming/modularity-testing-framework/tools/modulelint.py:DockerLint.testBasic: PASS (23.10 s)
 (12/20) /home/phracek/work/programming/modularity-testing-framework/tools/modulelint.py:DockerLint.testContainerIsRunning: PASS (17.80 s)
 (13/20) /home/phracek/work/programming/modularity-testing-framework/tools/modulelint.py:DockerLint.testLabels: PASS (4.83 s)
 (14/20) /home/phracek/work/programming/modularity-testing-framework/tools/modulelint.py:ModuleLintPackagesCheck.test: PASS (19.40 s)
 (15/20) generated.py:GeneratedTestsConfig.test_processrunning: PASS (17.97 s)
 (16/20) generated.py:GeneratedTestsConfig.test_selfcheck: PASS (18.78 s)
 (17/20) generated.py:GeneratedTestsConfig.test_selcheckError: ERROR (17.94 s)
 (18/20) sanity1.py:SanityCheck1.testSettingTestVariable: PASS (18.04 s)
 (19/20) sanity1.py:SanityCheck1.testBinExistsInRootDir: PASS (17.76 s)
 (20/20) sanity1.py:SanityCheck1.test3GccSkipped: ERROR (18.44 s)
RESULTS    : PASS 18 | ERROR 2 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
JOB TIME   : 178.04 s
JOB HTML   : /root/avocado/job-results/job-2017-07-12T15.13-51451e6/results.html
Makefile:7: recipe for target 'all' failed
make[1]: *** [all] Error 1
make[1]: Leaving directory '/home/phracek/work/FedoraModules/memcached/tests'
Makefile:14: recipe for target 'test' failed
make: *** [test] Error 2

Pull-Request has been closed by phracek

Pull Request was filed against wrong branch. Sorry

Metadata