Module: check_mk
Branch: master
Commit: 7b1ab7cf3bdf96bb0b08619ce6af417c52a3234b
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7b1ab7cf3bdf96…
Author: Jukka Aro <ja(a)mathias-kettner.de>
Date: Tue Feb 6 10:58:28 2018 +0100
Windows: fix test for unpacking script plugins
Ensure that files are packed in alphabetical order and verify the
content of uninstall_plugins.bat in the same alphabetical order.
---
agents/windows/it/test_agent_start_parameters.py | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/agents/windows/it/test_agent_start_parameters.py
b/agents/windows/it/test_agent_start_parameters.py
index 3fa5651..b1d26bb 100644
--- a/agents/windows/it/test_agent_start_parameters.py
+++ b/agents/windows/it/test_agent_start_parameters.py
@@ -142,7 +142,7 @@ def pack(install_basedir):
old_cwd = os.path.abspath('.')
os.chdir(install_basedir)
for relative_dir, _unused_dirs, files in os.walk("."):
- for filename in files:
+ for filename in sorted(files):
path = (relative_dir + "/" + filename)[2:]
cap += _cap_entry(path)
os.chdir(old_cwd)
@@ -254,15 +254,8 @@ def verify_plugin_output():
def verify_uninstall_batch(script):
drive_letter = r'[A-Z]:'
- def paircmp(t1, t2):
- if t1[0] < t2[0]:
- return -1
- elif t2[0] < t1[0]:
- return 1
- return 0
-
if script:
- test_plugins = [t[0] for t in Globals.testfiles[2]]
+ test_plugins = [t[0] for t in sorted(Globals.testfiles[2])]
else:
test_plugins = [Globals.binaryplugin]
expected_uninstall = [