diff --git a/glances/exports/glances_couchdb/__init__.py b/glances/exports/glances_couchdb/__init__.py index 4bedf4f3..6147b137 100644 --- a/glances/exports/glances_couchdb/__init__.py +++ b/glances/exports/glances_couchdb/__init__.py @@ -12,7 +12,7 @@ # How to test ? # # 1) docker run -d -e COUCHDB_USER=admin -e COUCHDB_PASSWORD=admin -p 5984:5984 --name my-couchdb couchdb -# 2) ./venv/bin/python -m glances -C ./conf/glances.conf --export couchdb --quiet +# 2) .venv/bin/python -m glances -C ./conf/glances.conf --export couchdb --quiet # 3) Result can be seen at: http://127.0.0.1:5984/_utils # diff --git a/glances/outputs/static/README.md b/glances/outputs/static/README.md index 66cbf690..ba59734c 100644 --- a/glances/outputs/static/README.md +++ b/glances/outputs/static/README.md @@ -33,7 +33,7 @@ hash -r You must run the following command from the `glances/outputs/static/` directory. ```bash -./venv/bin/python ./generate_webui_conf.py > ./glances/outputs/static/js/uiconfig.json +.venv/bin/python ./generate_webui_conf.py > ./glances/outputs/static/js/uiconfig.json cd glances/outputs/static/ ``` diff --git a/run-venv.py b/run-venv.py index 4048c42d..40d6c9df 100755 --- a/run-venv.py +++ b/run-venv.py @@ -1,4 +1,4 @@ -#!./venv/bin/python +#!.venv/bin/python import re import sys diff --git a/tests/conftest.py b/tests/conftest.py index 6b3a801f..4596b218 100755 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -60,8 +60,8 @@ def glances_stats_no_history(): @pytest.fixture(scope="session") def glances_webserver(): - if os.path.isfile('./venv/bin/python'): - cmdline = "./venv/bin/python" + if os.path.isfile('.venv/bin/python'): + cmdline = ".venv/bin/python" else: cmdline = "python" cmdline += f" -m glances -B 0.0.0.0 -w --browser -p {SERVER_PORT} -C ./conf/glances.conf" diff --git a/tests/test_export_csv.sh b/tests/test_export_csv.sh index 193cd7b3..3c7111c2 100755 --- a/tests/test_export_csv.sh +++ b/tests/test_export_csv.sh @@ -7,7 +7,7 @@ set -e # This will run synchronously now since we're using --stop-after echo "Glances starts to export system stats to CSV file /tmp/glances.csv (duration: ~ 20 seconds)" rm -f /tmp/glances.csv -./venv/bin/python -m glances --export csv --export-csv-file /tmp/glances.csv --stop-after 10 --quiet +.venv/bin/python -m glances --export csv --export-csv-file /tmp/glances.csv --stop-after 10 --quiet echo "Checking CSV file..." -./venv/bin/python ./tests-data/tools/csvcheck.py -i /tmp/glances.csv -l 9 +.venv/bin/python ./tests-data/tools/csvcheck.py -i /tmp/glances.csv -l 9 diff --git a/tests/test_export_duckdb.sh b/tests/test_export_duckdb.sh index 275bd546..888ea800 100755 --- a/tests/test_export_duckdb.sh +++ b/tests/test_export_duckdb.sh @@ -10,9 +10,9 @@ rm -f /tmp/glances.db # Run glances with export to DuckDB, stopping after 10 writes # This will run synchronously now since we're using --stop-after echo "Glances to export system stats to DuckDB (duration: ~ 20 seconds)" -./venv/bin/python -m glances --config ./conf/glances.conf --export duckdb --stop-after 10 --quiet +.venv/bin/python -m glances --config ./conf/glances.conf --export duckdb --stop-after 10 --quiet echo "Checking DuckDB database..." -./venv/bin/python ./tests-data/tools/duckdbcheck.py -i /tmp/glances.db -l 9 +.venv/bin/python ./tests-data/tools/duckdbcheck.py -i /tmp/glances.db -l 9 echo "Script completed successfully!" \ No newline at end of file diff --git a/tests/test_export_influxdb_v1.sh b/tests/test_export_influxdb_v1.sh index ebfadc71..58494a73 100755 --- a/tests/test_export_influxdb_v1.sh +++ b/tests/test_export_influxdb_v1.sh @@ -9,7 +9,7 @@ set -e echo "Starting InfluxDB version 1 container..." docker run -d --name influxdb-v1-for-glances \ -p 8086:8086 \ - influxdb:1.11 + influxdb:1.12 # Wait for InfluxDB to be ready (retry for up to 30 seconds) echo "Waiting for InfluxDB to start..." @@ -38,7 +38,7 @@ docker exec influxdb-v1-for-glances influx -execute 'CREATE DATABASE glances' # Run glances with export to InfluxDB, stopping after 10 writes # This will run synchronously now since we're using --stop-after echo "Glances to export system stats to InfluxDB (duration: ~ 20 seconds)" -./venv/bin/python -m glances --export influxdb --stop-after 10 --quiet +.venv/bin/python -m glances --export influxdb --stop-after 10 --quiet echo "Checking if Glances data was successfully exported to InfluxDB..." # Query to check if data exists in the glances database diff --git a/tests/test_export_influxdb_v3.sh b/tests/test_export_influxdb_v3.sh index 32fba08d..35f6016c 100755 --- a/tests/test_export_influxdb_v3.sh +++ b/tests/test_export_influxdb_v3.sh @@ -37,7 +37,7 @@ TABLES_INIT_COUNT=$(echo "$TABLES_INIT" | jq length) # Run glances with export to InfluxDB, stopping after 10 writes # This will run synchronously now since we're using --stop-after echo "Glances to export system stats to InfluxDB (duration: ~ 20 seconds)" -./venv/bin/python -m glances --config /tmp/glances.conf --export influxdb3 --stop-after 10 --quiet +.venv/bin/python -m glances --config /tmp/glances.conf --export influxdb3 --stop-after 10 --quiet echo "Checking if Glances data was successfully exported to InfluxDB..." # Query to check if data exists in the glances database diff --git a/tests/test_export_json.sh b/tests/test_export_json.sh index 75236a25..a8a7f754 100755 --- a/tests/test_export_json.sh +++ b/tests/test_export_json.sh @@ -7,7 +7,7 @@ set -e # This will run synchronously now since we're using --stop-after echo "Glances starts to export system stats to JSON file /tmp/glances.json (duration: ~ 10 seconds)" rm -f /tmp/glances.json -./venv/bin/python -m glances --export json --export-json-file /tmp/glances.json --stop-after 3 --quiet +.venv/bin/python -m glances --export json --export-json-file /tmp/glances.json --stop-after 3 --quiet echo "Checking JSON file..." jq . /tmp/glances.json diff --git a/tests/test_export_prometheus.sh b/tests/test_export_prometheus.sh index e489894f..d5447ab6 100755 --- a/tests/test_export_prometheus.sh +++ b/tests/test_export_prometheus.sh @@ -6,7 +6,7 @@ set -e # Run glances with export to Prometheus, stopping after 10 writes # This will run synchronously now since we're using --stop-after echo "Glances to export system stats to Prometheus" -./venv/bin/python -m glances --config ./conf/glances.conf --export prometheus --stop-after 10 --quiet & +.venv/bin/python -m glances --config ./conf/glances.conf --export prometheus --stop-after 10 --quiet & # Get the PID of the last background command GLANCES_PID=$! diff --git a/tests/test_export_timescaledb.sh b/tests/test_export_timescaledb.sh index 7bfe8538..7b6dae19 100755 --- a/tests/test_export_timescaledb.sh +++ b/tests/test_export_timescaledb.sh @@ -31,11 +31,11 @@ docker exec timescaledb-for-glances psql -d "postgres://postgres:password@localh # Run glances with export to TimescaleDB, stopping after 10 writes # This will run synchronously now since we're using --stop-after echo "Glances to export system stats to TimescaleDB (duration: ~ 20 seconds)" -./venv/bin/python -m glances --config ./conf/glances.conf --export timescaledb --stop-after 10 --quiet +.venv/bin/python -m glances --config ./conf/glances.conf --export timescaledb --stop-after 10 --quiet docker exec timescaledb-for-glances psql -d "postgres://postgres:password@localhost/glances" -c "SELECT * from cpu;" --csv > /tmp/timescaledb-for-glances_cpu.csv -./venv/bin/python ./tests-data/tools/csvcheck.py -i /tmp/timescaledb-for-glances_cpu.csv -l 9 +.venv/bin/python ./tests-data/tools/csvcheck.py -i /tmp/timescaledb-for-glances_cpu.csv -l 9 # Stop and remove the TimescaleDB container echo "Stopping and removing TimescaleDB container..." diff --git a/tests/test_restful.py b/tests/test_restful.py index 609096d3..07a917f9 100755 --- a/tests/test_restful.py +++ b/tests/test_restful.py @@ -54,8 +54,8 @@ class TestGlances(unittest.TestCase): global pid print('INFO: [TEST_000] Start the Glances Web Server API') - if os.path.isfile('./venv/bin/python'): - cmdline = "./venv/bin/python" + if os.path.isfile('.venv/bin/python'): + cmdline = ".venv/bin/python" else: cmdline = "python" cmdline += f" -m glances -B 0.0.0.0 -w --browser -p {SERVER_PORT} --disable-webui -C ./conf/glances.conf" diff --git a/tests/test_xmlrpc.py b/tests/test_xmlrpc.py index 141f41b9..35a6c5ff 100755 --- a/tests/test_xmlrpc.py +++ b/tests/test_xmlrpc.py @@ -53,8 +53,8 @@ class TestGlances(unittest.TestCase): global pid print('INFO: [TEST_000] Start the Glances Web Server') - if os.path.isfile('./venv/bin/python'): - cmdline = "./venv/bin/python" + if os.path.isfile('.venv/bin/python'): + cmdline = ".venv/bin/python" else: cmdline = "python" cmdline += f" -m glances -B localhost -s -p {SERVER_PORT}"