Skip to content

Commit fe8f1d6

Browse files
committed
utest cleanup
1 parent aeacaf3 commit fe8f1d6

2 files changed

Lines changed: 4 additions & 8 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"name":"plugin_config","desc":"Full config: all collector_args + analyzer_args, values that pass on Ubuntu","global_args":{},"plugins":{"PackagePlugin":{"collection_args":{},"analysis_args":{"exp_package_ver":{"libc|python|apt":null},"regex_match":true,"rocm_regex":null,"enable_rocm_regex":false}},"SysSettingsPlugin":{"collection_args":{"paths":["/sys/kernel/mm/transparent_hugepage/enabled","/sys/kernel/mm/transparent_hugepage/defrag"],"directory_paths":["/sys/class/net"]},"analysis_args":{"checks":[{"path":"/sys/kernel/mm/transparent_hugepage/enabled","expected":["always","madvise","never"],"name":"thp_enabled","pattern":null},{"path":"/sys/kernel/mm/transparent_hugepage/defrag","expected":["always","madvise","never","defer"],"name":"thp_defrag","pattern":null},{"path":"/sys/class/net","expected":[],"name":"net_interfaces","pattern":"^(lo|eth|enp|wl|br-|docker|ens)"}]}}},"result_collators":{}}

test/functional/test_sys_settings_plugin.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,6 @@
3030
import pytest
3131

3232

33-
def _project_root() -> Path:
34-
"""Return project root (directory containing plugin_config.json)."""
35-
return Path(__file__).resolve().parent.parent.parent
36-
37-
3833
@pytest.fixture
3934
def fixtures_dir():
4035
"""Return path to fixtures directory."""
@@ -48,9 +43,9 @@ def sys_settings_config_file(fixtures_dir):
4843

4944

5045
@pytest.fixture
51-
def plugin_config_json():
52-
"""Return path to project root plugin_config.json (full config: paths + directory_paths + checks)."""
53-
return _project_root() / "plugin_config.json"
46+
def plugin_config_json(fixtures_dir):
47+
"""Return path to fixture plugin_config.json."""
48+
return fixtures_dir / "plugin_config.json"
5449

5550

5651
def test_sys_settings_plugin_with_config_file(run_cli_command, sys_settings_config_file, tmp_path):

0 commit comments

Comments
 (0)