Francesco Romani has posted comments on this change.

Change subject: Make GuestAgentLinux2 patchable for unit tests
......................................................................


Patch Set 4:

(2 comments)

fine with the concept, a couple of open questions which caught my eye only now 
(sorry for late noticing!)

http://gerrit.ovirt.org/#/c/28937/4/ovirt-guest-agent/GuestAgentLinux2.py
File ovirt-guest-agent/GuestAgentLinux2.py:

Line 36:             pass
Line 37:     CredServer = CredServerFake
Line 38: 
Line 39: 
Line 40: _GUEST_SCRIPTS_INSTALL_PATH = '/usr/share/ovirt-guest-agent'
I wonder if this should be filled (or not) by the build step and/or by 
packaging scriptlet, instead of being a plain constant.
Line 41: 
Line 42: 
Line 43: def _get_script_path(name):
Line 44:     return os.path.join(_GUEST_SCRIPTS_INSTALL_PATH, name)


http://gerrit.ovirt.org/#/c/28937/4/tests/guest_agent_test.py
File tests/guest_agent_test.py:

Line 14: import test_port
Line 15: 
Line 16: 
Line 17: def _get_scripts_path():
Line 18:     scriptpath = inspect.getfile(inspect.currentframe())
In VDSM tests, to get the current directory on which the tests are run, we use

  os.path.dirname(__file__)

could that be used here? inspect looks a bit scary :)
Line 19:     scriptdir = os.path.dirname(os.path.abspath(scriptpath))
Line 20:     return os.path.abspath(os.path.join(scriptdir, '../scripts'))
Line 21: 
Line 22: 


-- 
To view, visit http://gerrit.ovirt.org/28937
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I6f0a927976272687b47f1e78e3a34eb6f23b64c9
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-guest-agent
Gerrit-Branch: master
Gerrit-Owner: Vinzenz Feenstra <[email protected]>
Gerrit-Reviewer: Francesco Romani <[email protected]>
Gerrit-Reviewer: Michal Skrivanek <[email protected]>
Gerrit-Reviewer: Vinzenz Feenstra <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to