Module: check_mk
Branch: master
Commit: 388b139a5c460e93da898e64c3f8e2fc82a4e496
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=388b139a5c460e…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Jul 28 17:05:48 2016 +0200
tests: edition can now also be set via environment
---
tests/testlib/__init__.py | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/tests/testlib/__init__.py b/tests/testlib/__init__.py
index d3215ea..8e50b56 100644
--- a/tests/testlib/__init__.py
+++ b/tests/testlib/__init__.py
@@ -202,10 +202,13 @@ def site(request):
return site_id
def site_version():
- version = os.environ.get("VERSION", CMKVersion.DEFAULT)
- return version
+ return os.environ.get("VERSION", CMKVersion.DEFAULT)
- site = Site(site_id=site_id(), version=site_version())
+ def site_edition():
+ return os.environ.get("EDITION", CMKVersion.CEE)
+
+ site = Site(site_id=site_id(), version=site_version(),
+ edition=site_edition())
site.cleanup_if_wrong_version()
site.create()
site.start()