-
Notifications
You must be signed in to change notification settings - Fork 364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Removing kimchi/tests/utils.py, use tests/utils.py from WoK instead #760
Labels
Comments
danielhb
added a commit
that referenced
this issue
Nov 19, 2015
There are several common functions such as run_tests, get_free_port and running_as_root that should be available to all plug-ins. This patch enables the module /tests/utils.py of WoK to be used by any unit test of any WoK plug-in. There's also a small tweak in utils.py that allows the retrieval of its 'fake_user' attribute. This patch is part of the solution of Kimchi Github #760. Signed-off-by: Daniel Henrique Barboza <dhbarboza82@gmail.com>
danielhb
added a commit
that referenced
this issue
Nov 19, 2015
This patch does the following Kimchi changes: - tests/run_tests.sh.in: added WoK root dir to PYTHONPATH - tests/utils.py: deleted. - test_* files: all the files that were importing the former tests/utils.py from Kimchi will now be using the one from WoK. This patch solves Kimchi Github #760 Signed-off-by: Daniel Henrique Barboza <dhbarboza82@gmail.com>
Issue fixed after f28a30e went upstream |
patchew-importer
pushed a commit
to patchew-project/kimchi
that referenced
this issue
May 25, 2018
There are several common functions such as run_tests, get_free_port and running_as_root that should be available to all plug-ins. This patch enables the module /tests/utils.py of WoK to be used by any unit test of any WoK plug-in. There's also a small tweak in utils.py that allows the retrieval of its 'fake_user' attribute. This patch is part of the solution of Kimchi Github kimchi-project#760. Signed-off-by: Daniel Henrique Barboza <dhbarboza82@gmail.com>
patchew-importer
pushed a commit
to patchew-project/kimchi
that referenced
this issue
May 25, 2018
This patch does the following Kimchi changes: - tests/run_tests.sh.in: added WoK root dir to PYTHONPATH - tests/utils.py: deleted. - test_* files: all the files that were importing the former tests/utils.py from Kimchi will now be using the one from WoK. This patch solves Kimchi Github kimchi-project#760 Signed-off-by: Daniel Henrique Barboza <dhbarboza82@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The files kimchi/tests/utils.py and tests/utils.py from WoK are basically the same. It contains helper functions to, for example, launch a cherrypy-server to do REST tests.
This type of usage isn't exclusive to Kimchi and other plug-ins such as Ginger might benefit from accessing these functions from WoK.
To do that we'll need to change the run_tests.sh.in file of Kimchi to include the path to tests/utils.py in the pythonpath, make the tests subdir of wok root 'importable' and then adjust Kimchi unit tests to use this module instead of kimchi/tests/utils.py.
The text was updated successfully, but these errors were encountered: