Skip to content

Commit e4d4985

Browse files
committed
build(tox): pin linuxfabrik-lib>=3.1.0 so the test helpers are always available
The `lib.lftest` module in linuxfabrik-lib 3.1.0 ships the `run()`, `attach_tests()`, `attach_each()`, `run_mariadb()` and `MARIADB_LTS_IMAGES` helpers that the unit test files rely on. Up to now tox installed `linuxfabrik-lib` without a version constraint, so in theory CI could pull an older release from PyPI in which those helpers do not exist yet. The unit tests would then only work through the `sys.path.insert(0, '..')` shadow that points Python at the monitoring-plugins/lib symlink, which requires the lib repo to be checked out next to the monitoring-plugins repo - a dev-machine convention, not something a fresh CI runner guarantees. Pin `linuxfabrik-lib>=3.1.0` in the tox environment so the matrix always installs a lib that has the helpers, and the sys.path shadow can stay pragmatic (local-iteration friendly) without being load-bearing on CI.
1 parent 84b765c commit e4d4985

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

tox.ini

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,14 @@ no_package = true
99
[testenv]
1010
deps =
1111
beautifulsoup4
12-
linuxfabrik-lib
12+
# Pinned to match requirements.txt so the tox matrix picks up the
13+
# lftest helpers (run, attach_tests, attach_each, run_mariadb,
14+
# MARIADB_LTS_IMAGES) that the unit tests rely on. Raise this on
15+
# every lib bump that introduces new test helpers; otherwise tests
16+
# that use them only work through the sys.path.insert(0, '..')
17+
# shadow and break on any CI runner that does not have the lib
18+
# repo checked out side-by-side.
19+
linuxfabrik-lib>=3.1.0
1320
lxml
1421
psutil
1522
python-keystoneclient

0 commit comments

Comments
 (0)