Module: check_mk
Branch: master
Commit: 38880e8938da5ba333cf682eff4b2e171b390a5a
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=38880e8938da5b…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Dec 22 15:29:53 2016 +0100
Added structure for packaging tests
Change-Id: I0973a0a1627c2ad1d924b0874e6768058bf40c67
---
pytest.ini | 6 +++++-
tests/packaging/test_setuid_bits.py | 20 ++++++++++++++++++++
2 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/pytest.ini b/pytest.ini
index a43d447..b4e450f 100644
--- a/pytest.ini
+++ b/pytest.ini
@@ -3,4 +3,8 @@ testpaths = tests
# Fail on first error and enable stepwise plugin to track steps and
# be able to continue with the failed test after analyzing and fixing
# the issue
-addopts = -rs -v --maxfail=1
+addopts = -rs -v --maxfail=1 -m "not packaging"
+# Register some markers to classify the tests
+markers =
+ pylint: Mark a test as pylint test.
+ packaging: This is a test to execute to verify the packaging of the testbuilds.
diff --git a/tests/packaging/test_setuid_bits.py b/tests/packaging/test_setuid_bits.py
new file mode 100644
index 0000000..f2a0052
--- /dev/null
+++ b/tests/packaging/test_setuid_bits.py
@@ -0,0 +1,20 @@
+import pytest
+import os
+
+pytestmark = pytest.mark.packaging
+
+def version_path():
+ path = os.environ.get("VERSION_PATH")
+ if not path:
+ raise Exception("VERSION_PATH environment variable pointing to the version
"
+ "directory (e.g. /bauwelt/download/2016.12.22) is
missing")
+ return path
+
+
+def test_setuid_bits():
+ print version_path()
+ print os.listdir(version_path())
+
+
+def test_files_not_in_version_path():
+ pass