Module: check_mk
Branch: master
Commit: a02d78354479939891abcdb2a987f7e94be2ac86
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a02d7835447993…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Oct 24 10:41:57 2017 +0200
Added new packaging tests for source file (tar.gz)
Change-Id: I0f97e93c8ac8309a22acea542d7640099af083b8
---
tests/packaging/test_files.py | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/tests/packaging/test_files.py b/tests/packaging/test_files.py
index fa7cc17..955fd44 100644
--- a/tests/packaging/test_files.py
+++ b/tests/packaging/test_files.py
@@ -25,9 +25,10 @@ def _get_package_paths(version_path, what):
# In case packages grow/shrink this check has to be changed.
@pytest.mark.parametrize("what,min_size,max_size", [
- ("rpm", 119*1024*1024, 210*1024*1024),
- ("deb", 94*1024*1024, 195*1024*1024),
- ("cma", 169*1024*1024, 215*1024*1024),
+ ("rpm", 119*1024*1024, 210*1024*1024),
+ ("deb", 94*1024*1024, 195*1024*1024),
+ ("cma", 169*1024*1024, 215*1024*1024),
+ ("tar.gz", 320*1024*1024, 400*1024*1024),
])
def test_package_sizes(version_path, what, min_size, max_size):
for pkg in _get_package_paths(version_path, what):
@@ -95,3 +96,11 @@ def test_cma_only_contains_version_paths(version_path):
for line in subprocess.check_output(["tar", "tvf",
pkg]).splitlines():
path = line.split()[5]
assert not path.startswith(version + "/")
+
+
+def test_src_only_contains_relative_version_paths(version_path):
+ for pkg in _get_package_paths(version_path, "tar.gz"):
+ prefix = pkg.replace(".tar.gz", "")
+ for line in subprocess.check_output(["tar", "tvf",
pkg]).splitlines():
+ path = line.split()[5]
+ assert not path.startswith(prefix + "/")