mirror of
https://github.com/PiBrewing/craftbeerpi4.git
synced 2024-12-22 05:24:54 +01:00
modified tests for hookable log data
This commit is contained in:
parent
7fd6361d30
commit
125bd07162
3 changed files with 14 additions and 14 deletions
|
@ -80,7 +80,7 @@
|
|||
"options": null,
|
||||
"source": "hidden",
|
||||
"type": "string",
|
||||
"value": "4.1.8.a11"
|
||||
"value": "4.1.10.a1"
|
||||
},
|
||||
"CSVLOGFILES": {
|
||||
"description": "Write sensor data to csv logfiles",
|
||||
|
@ -117,7 +117,7 @@
|
|||
"value": "No"
|
||||
},
|
||||
"INFLUXDBADDR": {
|
||||
"description": "IP Address of your influxdb server (If INFLUXDBCLOUD set to Yes use URL Address of your influxdb cloud server)",
|
||||
"description": "URL Address of your influxdb server incl. http:// and port, e.g. http://localhost:8086 (If INFLUXDBCLOUD set to Yes use URL Address of your influxdb cloud server)",
|
||||
"name": "INFLUXDBADDR",
|
||||
"options": null,
|
||||
"source": "craftbeerpi",
|
||||
|
@ -157,14 +157,6 @@
|
|||
"type": "string",
|
||||
"value": "cbpi4"
|
||||
},
|
||||
"INFLUXDBPORT": {
|
||||
"description": "Port of your influxdb server",
|
||||
"name": "INFLUXDBPORT",
|
||||
"options": null,
|
||||
"source": "craftbeerpi",
|
||||
"type": "string",
|
||||
"value": "8086"
|
||||
},
|
||||
"INFLUXDBPWD": {
|
||||
"description": "Password for your influxdb database (only if required)(If INFLUXDBCLOUD set to Yes use token of your influxdb cloud database)",
|
||||
"name": "INFLUXDBPWD",
|
||||
|
@ -174,7 +166,7 @@
|
|||
"value": " "
|
||||
},
|
||||
"INFLUXDBUSER": {
|
||||
"description": "User name for your influxdb database (only if required)(If INFLUXDBCLOUD set to Yes use organisation of your influxdb cloud database)",
|
||||
"description": "User Name for your influxdb database (only if required)(If INFLUXDBCLOUD set to Yes use organisation of your influxdb cloud database)",
|
||||
"name": "INFLUXDBUSER",
|
||||
"options": null,
|
||||
"source": "craftbeerpi",
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
{
|
||||
"data": []
|
||||
"data": [
|
||||
{
|
||||
"id": "unconfigured_test_sensor_ID",
|
||||
"name": "unconfigured_mqtt_sensor",
|
||||
"props": {},
|
||||
"state": false,
|
||||
"type": "MQTTSensor"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -10,10 +10,10 @@ class LoggerTestCase(CraftBeerPiTestCase):
|
|||
async def test_log_data(self):
|
||||
|
||||
os.makedirs(os.path.join(".", "tests", "logs"), exist_ok=True)
|
||||
log_name = "test"
|
||||
log_name = "unconfigured_test_sensor_ID"
|
||||
#clear all logs
|
||||
self.cbpi.log.clear_log(log_name)
|
||||
assert len(glob.glob(os.path.join(".", "tests", "logs", f"sensor_{log_name}.log*"))) == 0
|
||||
assert len(glob.glob(os.path.join(self.cbpi.log.logsFolderPath, f"sensor_{log_name}.log*"))) == 0
|
||||
|
||||
# write log entries
|
||||
for i in range(5):
|
||||
|
|
Loading…
Reference in a new issue