mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-20 04:19:00 +02:00
nixos/tests/home-assistant: print log before failing
This commit is contained in:
parent
db0286b5f6
commit
da58afdd68
|
@ -65,12 +65,12 @@ in {
|
|||
$hass->waitUntilSucceeds("mosquitto_pub -V mqttv311 -t home-assistant/test -u homeassistant -P '${apiPassword}' -m let_there_be_light");
|
||||
$hass->succeed("curl http://localhost:8123/api/states/binary_sensor.mqtt_binary_sensor -H 'x-ha-access: ${apiPassword}' | grep -qF '\"state\": \"on\"'");
|
||||
|
||||
# Check that no errors were logged
|
||||
$hass->fail("cat ${configDir}/home-assistant.log | grep -qF ERROR");
|
||||
|
||||
# Print log to ease debugging
|
||||
my $log = $hass->succeed("cat ${configDir}/home-assistant.log");
|
||||
print "\n### home-assistant.log ###\n";
|
||||
print "$log\n";
|
||||
|
||||
# Check that no errors were logged
|
||||
$hass->fail("cat ${configDir}/home-assistant.log | grep -qF ERROR");
|
||||
'';
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue