Added tests for global tags and retention policies

This commit is contained in:
Walter Dal Mut
2015-06-10 15:54:06 +02:00
parent 4f94172fcb
commit 5a162a9704
+8 -1
View File
@@ -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()