mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-27 16:08:55 +02:00
Added tests for global tags and retention policies
This commit is contained in:
@@ -79,7 +79,7 @@ class ClientFactoryTest extends \PHPUnit_Framework_TestCase
|
||||
* @group factory
|
||||
* @dataProvider getHttpAdapters
|
||||
*/
|
||||
public function testCreateTcpClientWithFilter($adapter)
|
||||
public function testCreateTcpClientWithAllOptions($adapter)
|
||||
{
|
||||
$options = [
|
||||
"adapter" => [
|
||||
@@ -89,6 +89,11 @@ class ClientFactoryTest extends \PHPUnit_Framework_TestCase
|
||||
"host" => "127.0.0.1",
|
||||
"username" => "user",
|
||||
"password" => "pass",
|
||||
"retention_policy" => "too_many_data",
|
||||
"tags" => [
|
||||
"region" => "eu",
|
||||
"env" => "prod",
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
@@ -99,6 +104,8 @@ class ClientFactoryTest extends \PHPUnit_Framework_TestCase
|
||||
$this->assertEquals("127.0.0.1", $client->getAdapter()->getOptions()->getHost());
|
||||
$this->assertEquals("user", $client->getAdapter()->getOptions()->getUsername());
|
||||
$this->assertEquals("pass", $client->getAdapter()->getOptions()->getPassword());
|
||||
$this->assertEquals(["region" => "eu", "env" => "prod"], $client->getAdapter()->getOptions()->getTags());
|
||||
$this->assertEquals("too_many_data", $client->getAdapter()->getOptions()->getRetentionPolicy());
|
||||
}
|
||||
|
||||
public function getHttpAdapters()
|
||||
|
||||
Reference in New Issue
Block a user