mirror of
https://github.com/openwrt/packages.git
synced 2026-04-15 19:02:09 +00:00
Update package to 5.3.2. Bug fix: - Correctly serialize nanosecond-precision DataFrame timestamps; previously nanosecond timestamps were not serialized correctly when writing via DataFrameClient Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
26 lines
674 B
Bash
Executable File
26 lines
674 B
Bash
Executable File
#!/bin/sh
|
|
|
|
[ "$1" = python3-influxdb ] || exit 0
|
|
|
|
python3 - << 'EOF'
|
|
from influxdb import DataFrameClient, InfluxDBClient
|
|
from influxdb.line_protocol import make_lines
|
|
|
|
# Test line protocol generation (no server needed)
|
|
data = [
|
|
{
|
|
"measurement": "cpu",
|
|
"tags": {"host": "server01"},
|
|
"fields": {"value": 0.64},
|
|
}
|
|
]
|
|
line = make_lines({"points": data}).strip()
|
|
assert line.startswith("cpu,host=server01"), f"Unexpected line: {line}"
|
|
assert "value=0.64" in line
|
|
|
|
# Test client instantiation (no connection)
|
|
client = InfluxDBClient(host="localhost", port=8086, database="testdb")
|
|
assert client._host == "localhost"
|
|
assert client._port == 8086
|
|
EOF
|