mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 00:24:21 +02:00
Throws InfluxDBClientError if there was an error after quering
This commit is contained in:
@@ -40,6 +40,27 @@ EOD;
|
||||
new ResultSet($errorResult);
|
||||
}
|
||||
|
||||
/**
|
||||
* Throws Exception if something went wrong with influxDB after processing the query
|
||||
* @expectedException \Leaseweb\InfluxDB\InfluxDBClientError
|
||||
*/
|
||||
public function testThrowsInfluxDBExceptionIfAnyErrorInSeries()
|
||||
{
|
||||
|
||||
$errorResult = <<<EOD
|
||||
{
|
||||
"results": [
|
||||
{
|
||||
"series": [],
|
||||
"error": "There was an error after querying"
|
||||
}
|
||||
]
|
||||
}
|
||||
EOD;
|
||||
$rs = new ResultSet($errorResult);
|
||||
$rs->getSeries();
|
||||
}
|
||||
|
||||
/**
|
||||
* We can get points from measurement
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user